Problem on PHP's "include"
Posted: Wed Jun 06, 2007 4:27 am
Hi everyone. I'm having problems displaying the file called "nav.php", using include, in my "index.php". The contents of nav.php displays but it can't display the images which are referenced inside nav.php with a variable declared in my config.php. Please see the codes below to understand the structure of the file.
What could be the problem with my code? TIA.
config.php
include.php
nav.php
index.php
What could be the problem with my code? TIA.
config.php
Code: Select all
<?
$image_path = "http://www.domain.com/images";
?>include.php
Code: Select all
<?
include ("/var/www/domain/config/config.php");
?>Code: Select all
<table>
<tr><td>LINK: <img src="<?=$image_path?>/button.gif"></td></tr>
</table>Code: Select all
<?include("http://www.domain.com/include.php")?>
<html>
<head><title>Test</title></head>
<body>
<?
include ("http://www.domain.com/common/nav.php");
?>
</body>
</html>