View Full Version : PHP Includes randomly stoped working.


sockeye_salmon
04-21-2005, 10:29 PM
Hi. My Website is dancing-sheep.com, and I have been using a PHP include as my nav bar for a few weeks. Today, it randomly stopped working and had the same error message as when my menu.inc didn't exist yet. What am I doing wrong?

Fenring
04-21-2005, 10:47 PM
Try making the file a text file. See if that helps. It's almost as if it can't locate the file.

sockeye_salmon
04-21-2005, 11:29 PM
Thanks...but it doesn't work. Should I e-mail my webhost?

thezeppzone
04-22-2005, 12:13 AM
make your includes just main.php, or whatever it is that your including, and if the file is not in the same directory, use your local path, not the website path, i.e mine is /home/thezeppzone/thezeppzone.com/, but yours isnt neccesarily that, they vary between hosts, just slightly though, by the looks of it yours is/would be /home/barnaby/dancings/dancing-sheep.com/filehere.php if that doesnt work, yes, email your host, as there is no reason for that to happen. well, mine did the same thing a few weeks ago and i changed all my includes to local paths like i suggested for you and they worked fine and still do

pb&j
04-22-2005, 05:03 AM
1. upload and save your file again just incase it was corrupted for an unknown reason.

2. yes, talk to your host about it as php is done at a server level, perhaps they made a modification that needs adjusting.

bejayel
04-22-2005, 07:18 PM
you could be uploading th ephp in the wrong format with the ftp...

also you dont have to use menu.inc. you can also use menu.php. Your host may have disable .inc for some unknown reason...some are just like that for some reason.