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


ピックアップ記事

Drupal 関連サイト

2011年04月24日 過去Blog
http://www.forest-and-trees.com/comment/reply/146#comment-form http://www10.atwiki.jp/drupal/
「Drupal 関連サイト」をはてなブックマークに追加

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

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

iPhone用のアイコンなどを配布しているサイト

2011年01月27日 過去Blog
以下のサイトによくまとめられているので、参考に。 http://phpjavascriptroom.com/?t=mobile&p=iphoneandroidmockup#a_iphone_icon 高画質のiconがダウンロード出来るサイト http://www.iconspedia.com/ iconのサイズや設置方法について https://developer.apple.…
「iPhone用のアイコンなどを配布しているサイト」をはてなブックマークに追加

PHP 配列の要素を指定し、キーを取り出す

2010年04月14日 過去Blog
配列の要素の値から、そのキーを取り出す場合。 <?php $array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red'); $key = array_search('green', $array); // $key = 2; $key = array_search('red', $array); // $key = …
「PHP 配列の要素を指定し、キーを取り出す」をはてなブックマークに追加

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 日付の減算・差分を求める」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy