内の私のコードは次のfunctions.php
とおりです。
<?php
$id = 10;
$html = file_get_contents("inc-star-rating.php?id=$id");
echo $html;
?>
の内容は次のinc-star-rating.php
とおりです。
<?php
$id = $_GET['id'];
echo "<div>I have the ID of $id</div>";
?>
どちらもサーバー上の同じディレクトリにあるのに、なぜ次のエラーが発生するのですか?:
警告: file_get_contents(inc-star-rating.php?id=10) [function.file-get-contents]: ストリームを開くことができませんでした: そのようなファイルまたはディレクトリはありません