PHP include() file paths in Apache virtual hosts
I have a working Apache/PHP/MySQL setup on our home network server (Fedora Core 2), and have just set up a virtual host for developing a new Web site.
On previous PHP sites I've built, I have used PHP's include() function for page elements which are re-used (e.g. menus, meta tags and so on), and I intend to do the same with this site. However, I've come across a problem with the file path I use in the include statements. Before now, a typical include would look something like this: Code:
include (/includes/menu.php); This is currently working fine on our existing Web site (on an external server), but when I try this on my home server, the include operation doesn't work at all. If I try this: Code:
include (./includes/menu.php); I think this is something to do with the server setup - maybe php.ini. Can anyone please advise me? Many thanks, Tim |
All times are GMT -5. The time now is 10:44 PM. |