2010年07月07日 過去Blog
■php.iniの設定が変更可能な場合 PHP コード スニペットを使用していて、ウェブページに “URL file-access is disabled in the server configuration” (URL ファイル アクセスはサーバーの設定で無効になっています) エラー メッセージが表示される場合は、ウェブマスターまたはホスティング プロバイダに連絡して、PHP サーバーの設定内の allow_url_fopen と allow_url_include を有効にしてください。 参考サイト:https://www.google.com/adsense/support/bin/answer.py?hl=jp&answer=70494 ■phpファイル内で解決する場合 <? php function get_content($url) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); ob_start(); curl_exec ($ch); curl_close ($ch); $string = ob_get_contents(); ob_end_clean(); return $string; } #usage: $content = get_content (“http://www.php.net”); var_dump ($content); ?> 参考サイト:http://jp.php.net/manual/ja/function.fopen.php

この投稿へのコメント

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

コメントを残す

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

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

CAPTCHA


ピックアップ記事

Xcode上で静的解析

2011年04月27日 過去Blog
http://www.j-love.info/natsu/iphone-app/natsus_note/dev/tips/iphonexcodebuild_and_analyze.html
「Xcode上で静的解析」をはてなブックマークに追加

PHPでサイトのタイトルを取得

2010年03月30日 過去Blog
参照元:http://creazy.net/2008/05/php_get_page_title_sample.html how to cure depression…
「PHPでサイトのタイトルを取得」をはてなブックマークに追加

twitterの登録メールの確認がエラーになる件

2011年01月04日 過去Blog
twitterで登録メールの確認手続きを行っていた際に以下のようなエラーが出ました。 「Hold up! Sorry, the profile you were trying to view has been suspended due to strange activity 」 なにもオカしいことはしていないはずなので、困っていたのですが、原因は単純でした。 twitterのヘルプページに書い…
「twitterの登録メールの確認がエラーになる件」をはてなブックマークに追加

PHP 日付の減算・差分を求める

2010年06月01日 過去Blog
define( "ONE_DAY_SEC", 24 * 3600 ); // 日付けの差分をとる関数 function dateDiff( $date1, $date2 ) { return ( strtotime( $date1 ) - strtotime( $date2 ) ) / ONE_DAY_SEC; } // 実行サンプル $date1 = date('Y/m/d…
「PHP 日付の減算・差分を求める」をはてなブックマークに追加

PEARインストール

2010年04月03日 過去Blog
PEARインストール # yum -y install php-pear PEARのバージョンを確認 # pear -V
「PEARインストール」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy