html - PHP !_GET displays blank page -


so url:

http://myawesomesite.com/base.php?file=myawesomefile

and base.php file:

          <?php  if (is_file("$_get["file"].inc.php")) include ("$_get["file"].inc.php"); else include("homepage.inc.php");  ?> 

this results in blank page. doing wrong?

thanks in advance. cheers!

you're using double quotes in is_file() function , in $_get variable. they're in eachothers way.

use this:

if (is_file("$_get['file'].inc.php")) include ("$_get['file'].inc.php"); 

al though i'm not sure have right should give error , not blank page.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -