//ファイル一覧を表示するパスを指定する
$path = "../member";
//ディレクトリを表示する
print("ディレクトリ「".$path."」の一覧");
//文法 disk_free_space( パス )
//disk_free_spaceは指定したパスに対応するドライブの空き容量をバイト数で
//返す
print("ドライブの空き容量 ".disk_free_spac…
$img_path // 取得する画像のパス(URL)
$path = “ここは保存先のパス”; // /home/ドメイン/public_html/imagesなど
$img = file_get_contents($img_path) ;//画像を取得
$fullpath = $path.basename($img_path);//画像の保存フルパス
file_put_contents($fullpath, $img);//保存。
*basename >> パス中のファイル名の部分を返す
この投稿へのコメント
コメントはまだありません。