私はこのコードを持っているし、ローカルホスト上で正常に動作しますが、サーバー上で私にエラーを与える:ストリームとfile_put_content
警告:stream_get_contents()[function.stream-取得-内容]:ストリームは/家を/で求めてサポートしていません。 42行目のpluspon/public_html/get.php
警告:stream_get_contents()[function.stream-get-contents]:/home/pluspon/public_html/get.phpのストリームの0の位置を特定できませんでしたライン41
CODE:
$site = fopen('http://www.google.com', 'r');
$store = 'store.php';
$stream__ = stream_get_contents($site, -1, 0);
file_put_contents($store, $stream__, LOCK_EX);
fclose($site);
$check = file_get_contents($store);
# var_dump($check); print_r($check); var_export($check);
# or simple...
echo $check;
wHAtというエラーは、それを修正する方法を意味します!
これらのエラーは、画面またはApacheエラーログに出力されますか? stream_get_contents($ site、-1)内の0を削除します。この場合は不要です。 – JM4