Jump to content

php include error


justinede

Recommended Posts

I am trying to use

<?php include("http://justinledelson.com/includes/sidebar.php");?>

. i am getting these errors:

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/content/j/u/s/justinledelson/html/index.php on line 32

Warning: include(http://justinledelson.com/includes/sidebar.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/content/j/u/s/justinledelson/html/index.php on line 32

Warning: include() [function.include]: Failed opening 'http://justinledelson.com/includes/sidebar.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/j/u/s/justinledelson/html/index.php on line 32

 

I have no clue what is going on. I have used this before and it worked fine.

Link to comment
https://forums.phpfreaks.com/topic/163319-php-include-error/
Share on other sites

you are receiving that error because allow_url_fopen is OFF in PHP configuration (php.ini) file.

 

To understand php.ini  follow :http://www.slideshare.net/pritisolanki/understanding-phpini-presentation

 

you can't do ini_set() to set this this is System level configuration value.

 

I see you are trying to include <?php include("http://justinledelson.com/includes/sidebar.php");?>

 

if http://justinledelson.com is same site you are working then I think you should do as follow

 

<?php include("/includes/sidebar.php");?>

Link to comment
https://forums.phpfreaks.com/topic/163319-php-include-error/#findComment-861770
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.