failed to open stream

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

failed to open stream

Post by hame22 »

I have a problem with some of my include files. Before you start saying that is because I have not set the right path to my files, this is not the problem. 90% of the time my pages load corrctly. However 10% of the time I get the following error

failed to open stream: No such file or directory

when this happens all I have to do is refreash tha page and the file loads correctly.

I was wondering if anyone had ever experienced a similar problem and what they did to solve it, I have quite a number of files included throughoutb my pages and wiondered if this could affect the performance.

I would be most thankful if anyone could help me.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

i had a similar problem with a class. i would call to the class and it would always be included and then 10% of the time it would say that the class function did not exist, and a refresh would always fix the problem. what i did was declare it global,

$lang = new Lang;
global $lang;

now i have no idea why this worked but maybe it might give you a kick in the right direction on your problem.
Post Reply