GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   [PHP] - function "include" (https://gfy.com/showthread.php?t=216376)

Phrona 01-03-2004 11:54 AM

[PHP] - function "include"
 
When I try to include something that is in the main folder to some file that is in the subfolder, I get this:

Warning: main(): stream does not support seeking in /home/phrona/public_html/galleries/01/index.php on line 1

It works fine, but this warning appears at the top of the page. so I need:

a) How to do it without getting warnings

OR

b) command that hides warnings

Thanks

pornanza 01-03-2004 11:56 AM

@include('file.php');

to supress all errors for include or

error_reporting(0); to supress all errors on a page


not sure why you're getting that error, i'll have a think

ryan

Phrona 01-03-2004 12:04 PM

Quote:

Originally posted by pornanza
@include('file.php');

to supress all errors for include or

error_reporting(0); to supress all errors on a page


not sure why you're getting that error, i'll have a think

ryan

Thanks. Adding @ in front of include worked.

Libertine 01-03-2004 12:05 PM

Maybe it would be a good idea to actually post the code you are using here?

Weber 01-03-2004 12:06 PM

That's bug
Look here:

http://bugs.php.net/bug.php?id=24053

Solution: just put "@" before include

Libertine 01-03-2004 12:10 PM

Solution: if it's a local file, don't use http:// but the server path. If it's a remote file... well, then using include() is in most cases rather dangerous, and quite likely the wrong way to go about things.


All times are GMT -7. The time now is 01:01 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123