Jump to content

PHP Include problem (updated PHP)


ev5unleash

Recommended Posts

I have currently been using this same type of code for awhile in a lot of including code. When I updated my Apache and PHP the whole thing I put together stopped working. I was looking through fourms and I see that the PHP hass been updated and you can no longer use it. Although I'm using this same code to power the navigation on my site (http://www.ev5unleash.com) I don't see it being a problem. When I use it on different parts of my site I get  this error

 

Code:

<?php 

switch(strtolower($_POST['user']))  // 'content'
{
[i]Other code blocked out...[/i]
	case "ev5unleash":
	    include("homepage/ev5unleash/967456database956745.php");
	break;
	default:
	    include("loginincorrect.php");
	break;
}

?>

 

 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in homepage/ev5unleash/967456database956745.php on line 9

 

 

Please help!

Link to comment
https://forums.phpfreaks.com/topic/132228-php-include-problem-updated-php/
Share on other sites

sounds like include is disabled on your PHP configuration

 

 

try using file_get_contents like:

<?php

$a=file_get_contents("http://www.somesite.com/somefile.php");

echo $a;?>

 

 

or you can use short urls like

<?php
include("file.php");?>

Hmm, I inserted the solution into my code but now whenever anything gets included it shows a black page.

 

<?php 

switch(strtolower($_POST['user']))  // 'content'
{
*Other code blocked out*
	case "ev5unleash":
	    $a=file_get_contents("homepage/ev5unleash/967456database956745.php");
	break;
	default:
	    include("loginincorrect.php");
	break;
}

?>

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.