これまでにこれに遭遇したことはありませんが、if()ステートメント内でユーザー作成関数をテストする際に問題がありますか?
別のサーバーにある別のPHPインクルードファイル(「myPhpInclude.php」と呼ばれる)に次のものがあります。
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
function displayIt($phrase = NULL) {
if (is_null($phrase)) return false;
else return true;
}
if ($_SERVER['REMOTE_ADDR'] == '123.456.789.012') { /* my ip address */
echo 'include file is coming in ok...';
}
?>
PHPインクルードファイルとは別のサーバーにある私のHTMLドキュメントからの抜粋:
<?php include('http://mydomain.com/includes/myPhpInclude.php'); /* the displayIt() function is contained in this include file */ ?>
...
<div id="content">
<?php if (displayIt('on')) { /* <-- MY PROBLEM ORIGINATES HERE */?>
<p>Some content.</p>
<? } ?>
</div>
Webページはif()ステートメントの時点でレンダリングを停止し、エラーを返しません。PHPエラーデバッグがアクティブ化され、オンになっています。
ありがとう。