[B]Hi Guys,
I am new to php , i have a problem on the following scenario.
I have a root directory called “TestProg” inside it i have a file called “mainpage.php” and a directory called “Tutorial” , within the “Tutorial” directory i have a file called “content.php” and a directory called “img” within it an images file called “myPic.jpg”.
[COLOR=”Red”]please see the attachment pictures for the directory structure.
[B]The “mainpage.php” is the template file , it calls the content of the content.php with an include()… The content.php has a text and an img tag calling the image in mypic.jpg in the img directory.
When opening the “mainpage.php” , the content.php content is loaded properly by the exception of the image. when checking the html source code the path is incorrect (show img/mypic.jpg instead of Tutorial/ img/mypic.jpg)…
here is the content of both files
+++++++++++++++++++++++
// mainpages.php (under “TestProg” directory)
<html>
<body>
<h1> This is the main index pages <h1/>
<br />
<?php
include(‘tutorial/content.php’);
?>
</body>
</html>
========================================
// content.php (under “testProg/Tutorial” directory)
<p>
this is the image paragraph
<img src=”img/chebeya.jpg”>
</p>
====================================
can someone help to solve the path problem.
Thanks in advance ?
[upl-file uuid=9642fb65-8e8a-4d61-9ac3-0c3ac663c2e5 size=9kB]chartp.jpg