UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » Warning....

Warning....

Moderators: Gaia.

Page: 1

Author Post
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.
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, ...
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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.
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.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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.

Page: 1

UseBB Community » Help & Support » Warning....

UseBB Community is powered by UseBB 1 Forum Software