| Author |
Post |
|
|
#1 Thu May 10, 2007 7:04 pm
|
|
Moderator
Registered: Oct 2005
Posts: 462
Location: canada
|
Does anyone know why this warning would happen, in this chunk of code? Quote In file portal2.php on line 69:
E_WARNING - main(./sources/pboxes/) [function.main]: failed to open stream: Success
if ( $sidebox['content'] != '' ) { $left .= $sidebox['title'];
} else { require(ROOT_PATH.'sources/pboxes/'.$sidebox['file'].''); $left .= $file_contents; } }
Thanks. I tried searching for the error in google, but nothing helpful came up.
|
|
|
#2 Thu May 10, 2007 7:08 pm
|
|
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
|
I guess that error description is a bug or shortcoming in PHP. Most likely the file does not exist, is not writable, readable, ...
|
|
|
#3 Thu May 10, 2007 7:15 pm
|
|
Moderator
Registered: Oct 2005
Posts: 462
Location: canada
|
Well the file exists, because when I have the code flipped, i get the right output from the file:
if ( $sidebox['content'] != '' ) { require(ROOT_PATH.'sources/pboxes/'.$sidebox['file'].''); $left .= $file_contents;
} else { $left .= $sidebox['title']; } }
That works fine, it displays the contents in the file no problem. Except that the $sidebox['title'] doesn't show  . It's in a while loop if that changes anything.
|
|
|
#4 Thu May 10, 2007 9:28 pm
|
|
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
|
I think it's just a logic error, can't check it if I haven't got the full code.
|
|
|
#5 Thu May 10, 2007 10:01 pm
|
|
Moderator
Registered: Oct 2005
Posts: 462
Location: canada
|
Ok, it's no problem, i did it a different way and it seems to be working now.
|