みんな。
JPG 画像のサイズを変更する画像サイズ変更スクリプトを使用しています。リモートサーバーでは問題なく動作しましたが、残念ながらクライアントのサーバーでは動作しません。:-|
ディレクトリは書き込み可能です (権限は 777 に設定されています)。私が得ているのは次のとおりです。
Error: image does not exist: /home/content/u/s/e/username/correct/path/to/existing/file.jpg
デバッグに役立つ可能性のあるコードの一部を次に示します。
// Images must be local files, so for convenience we strip the domain if it's there
$image = preg_replace('/^(s?f|ht)tps?:\/\/[^\/]+/i', '', (string) $_GET['image']);
// ...
// Strip the possible trailing slash off the document root
$docRoot = preg_replace('/\/$/', '', DOCUMENT_ROOT);
//...
if (!file_exists($docRoot . $image))
{
header('HTTP/1.1 404 Not Found');
echo 'Error: image does not exist: ' . $docRoot . $image;
exit();
}
開発者として、ルート ディレクトリのサブディレクトリにアクセスする権限が与えられていることに注意してください。
問題のケースが明確になったことを願っています。舞台裏で何が起こっているのか途方に暮れています。ヘルプは大歓迎です