Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Mon Oct 25, 2004 11:53 am Reply with quote

Some of you may experience this error with some of your scripts. This error only appears to occur when processing PHP includes/requires which reference URLs (absolute
rather than relative paths). There are a few workaround but no clear fixes for this issue. Here are your options starting with the simplest.

Create a .htaccess file and put this in it

Code:
php_value error_reporting 0


then save this in your root directory

You can also try these fixes:
if this is your code

Code:
<?php 

include('http://nowhere.com/file.html');
?>


Suggested fixes:

Use relative paths rather than absolute URLs when including files stored locally on your account

Example:

Use this:

PHP Code:

Code:
<?php 

include('/home/userid/public_html/directory/file.html');
?>


...instead of this:

PHP Code:

Code:
<?php 

include('http://your_domain.com/directory/file.html');
?>



also:

When including remote files located outside of your domain try using @include, to suppress the error
message, rather than include

Example:

PHP Code:

Code:
<?php 

@include('http://somedomain.com/file.html');
?>

_________________
Themes BB Skins Only registered users can see links on this board! Get registered or login!
Graphic Tees Only registered users can see links on this board! Get registered or login!
Paranormal Tees Only registered users can see links on this board! Get registered or login!
Ghost Stories & More Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©