Forum Moderators: coopster

Message Too Old, No Replies

root directory problem

root directory problem in php,cant access stylesheet

         

Tk_liv

2:24 pm on May 17, 2011 (gmt 0)

10+ Year Member



Hi

I am new to php.Having problem accessing the files from inside a folder to outside of it.

I have my navigation menu in a file called "header.php".This header.php file fetching data fron datbase and including /calling several files from stylesheet and images folder.
require_once("includes/connect.php");

require_once("includes/functions.php");


But when including this header.php file from another file which is inside another folder say-(product/matrix.php) it not including or rather can't accessing files from stylesheets or images folder. although it is connectin and retrieving all data from database. Why it is so?How to solve this problem?

and anoter problem in "products/matrix.php" all navigation items are become a link with "prduct" folder like [localhost...]

Any reply would be great help.Thanks in advance.

g1smd

2:27 pm on May 17, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Stylesheets and images will be requested by the browser using a URL, not as a local "include" using a server-internal filepath.

Make sure that links to images and stylesheets begin with a leading slash and mention the full URL path to the file.

Tk_liv

3:21 pm on May 17, 2011 (gmt 0)

10+ Year Member



Thank you so very much g1smd.Its a great help.thanks a lot.it fix the problem.