Page 1 of 1

include statement not working

Posted: Mon Sep 04, 2006 5:43 pm
by satheshf12000
hi all..

I am using include statement to include("menu.php") in my index page(index.php and menu.php are in the same directory). then i have sports/cricket/cricket.php. when i use include statement like include("/menu.php") in sports/cricket/cricket.php, i am NOT getting the menu. whats wrong with this statement ? but the menu works fine in the index.php page.

thanks..

Posted: Mon Sep 04, 2006 5:47 pm
by feyd
A leading slash in a path indicates an absolute path. In this case PHP will attempt to load menu.php from your server's system root. IF you're a Windows user, root = C:\ or whatever drive letter you happen to be using.