File include

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
pustinia
Forum Newbie
Posts: 4
Joined: Fri Feb 04, 2011 2:14 am

File include

Post by pustinia »

Hi coders
Myy host upgraded it’s server from PHP 5.2.0 to PHP 5.2.6. and I use <?php include("inc/menu.php");?> to include php files in website.
It works well in my local server but when I upload it to the live server it does not work at all, help.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: File include

Post by greyhoundcode »

I wouldn't think this is anything to do with the PHP upgrade. I think you might need to double-check that filepath.
pustinia
Forum Newbie
Posts: 4
Joined: Fri Feb 04, 2011 2:14 am

Re: File include

Post by pustinia »

The file path is correct, i even tried putting the full url path but no luck. :D ..
If it was a path i was gonna get an error in the site..
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: File include

Post by greyhoundcode »

pustinia wrote:If it was a path i was gonna get an error in the site..
That depends on your error reporting level of course. Can you confirm what that is? Can you also confirm if other PHP scripts are executing as expected? What is the result if you substitute the following in place of your include code:

Code: Select all

if (file_exists($path))
    echo 'The file does exist';
else
    echo 'My file path is wrong';
pustinia
Forum Newbie
Posts: 4
Joined: Fri Feb 04, 2011 2:14 am

Re: File include

Post by pustinia »

Thanks greyhoundcode i will implement...
pustinia
Forum Newbie
Posts: 4
Joined: Fri Feb 04, 2011 2:14 am

Re: File include

Post by pustinia »

I have found the problem. It has to do with the hosting company and their stupid servers... :D
Post Reply