すべてのリンクで「filemtime」を使用する方法を教えてください。
例: - get 用の私の PHP ファイル: http://mywebsite.org/getdate.php - 日付を取得するリンク: http://thegoodwebsite.net/i/banp.gif
よろしくお願いします。
すべてのリンクで「filemtime」を使用する方法を教えてください。
例: - get 用の私の PHP ファイル: http://mywebsite.org/getdate.php - 日付を取得するリンク: http://thegoodwebsite.net/i/banp.gif
よろしくお願いします。
組み込みのラッパーは、 などの機能ファミリーをhttp
サポートしていません。だから:できません。stat
filemtime
HTTP プロトコルは、Last-Modified
代わりに使用できるヘッダー フィールドを定義します。カールの場合:
$curl = curl_init('http://thegoodwebsite.net/i/banp.gif');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_NOBODY, true);
curl_setopt($curl, CURLOPT_FILETIME, true);
if (false !== curl_exec($curl)) {
$time = curl_getinfo($curl, CURLINFO_FILETIME);
echo 'remote time of the retrieved document: ', $time;
}
curl_close($curl);
-1 を取得した場合、それは不明である可能性があります。