2009年12月06日 過去Blog
$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 >> パス中のファイル名の部分を返す

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

iPhone/iPadでプリントスクリーン

2011年01月08日 過去Blog
iPhone/iPadでプリントスクリーンをするには、ホームボタンと電源を切るボタン(正式名称不明^^;)を同時に押します。 作成されたファイルは、写真(カメラロール)内に保存されます。
「iPhone/iPadでプリントスクリーン」をはてなブックマークに追加

UITableView のcellの複数選択を実装する

2011年01月25日 過去Blog
//セルが選択された際に呼び出される - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //選択されたセルを取得 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; /…
「UITableView のcellの複数選択を実装する」をはてなブックマークに追加

phpでランダムなパスワードを生成

2010年01月29日 過去Blog
使用例 //パスワード生成クラス読み込み require_once 'My/Password.php'; //デフォルトは8桁のパスワードが生成されます $password = My_Password::getPassword(); var_dump($password); //『32桁、小文字英字のみ』のパスワード生成 $password = My_Password::getPassword(32, 'small'); var_dump($password); …
「phpでランダムなパスワードを生成」をはてなブックマークに追加

linux : chomod,chown パーミッション変更

2009年11月27日 過去Blog
chown USER_NAME /DIR_PATH/ chown USER_NAME -R /DIR_PATH/ -Rをつけることで指定ディレクトリ以下の全てのディレクトリ、ファイルの所有者を変更します。 physical therapy chicago…
「linux : chomod,chown パーミッション変更」をはてなブックマークに追加

iPadでiOS Dev Center内のリファレンスを見ると(^^)

2011年01月08日 過去Blog
iPad用に最適化されていて、とても使いやすくなっています(^_^) 私は、さっき気付いたんですが、既にご存知の方も多いのかもしれませんが、、、(^_^;)…
「iPadでiOS Dev Center内のリファレンスを見ると(^^)」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy