PDA

View Full Version : Include Error


Tyler
June 23rd, 2007, 05:06 AM
why cant I make my includes in folders like
<?php include("http://www.darkrai.org/top.php); ?>

I have it here
<html>
<head><title>Pokemon Green - Darkrai 491</title>

</head>

<body>
<?php include("http://www.darkrai.org/top.php"); ?>
<h2 class="sidebg">Pokemon Green</h2>

<div class="sidebg">Info</div>
Pokémon Green was the 1st Pokémon game EVER! It was released in Japan in 1996.<br>Unfortunately, this game never got here to the states, or anywhere else for that matter. If you ask Nintendo, they'll say that this is the same as Pokémon Blue, and/or Japan didn't get Blue. Both of those are not true. In Pokémon Green, the sprites were different from those in Blue. and some places in Green would have extra Pokémon to catch. And Japan DID get Pokémon Blue.
<br>
<div class="sidebg">Links</div>
<a href="Games/green/screen.php">Screenshots</a><br />
<a href="Games/green/review.php">Review</a><br />

</body>

</html>

Please help

Ausaudriel
June 23rd, 2007, 10:45 AM
include() won't allow you to use a URL like that, you have to use a relative path (id est /home/user/public_html/top.php)

Scizz
June 23rd, 2007, 01:41 PM
include() won't allow you to use a URL like that, you have to use a relative path (id est /home/user/public_html/top.php)

Actually, it does. It all depends on your server configuration. (See include(); (http://us2.php.net/include/), Example 16.7.)

But as Audy said, if you're including a file that is on the same server, the relative path would be the best to use. (phpinfo();, your host or your FTP program can tell you that path.)