$ _GET [] does not work

1

I have a .onion page hosted by Freedom, which supports PHP 5, I am trying to load the home.html home page from the% loader index.php , which has this start in code:

<?php
   $get = $_GET['load'];
   if(strpos($_GET['load'],'/language/') !== false) {
     $loadurl = file_get_contents("home.html");
     echo($loadurl);
     exit;
  }

When I enter the site, this is what appears at the top of the page and it does not appear correctly:

Both files are in the root directory of the hosting. how to resolve these messages?

    
asked by anonymous 13.01.2017 / 06:25

2 answers

5

You need to use isset to check if get has the index.

   if( isset( $_GET['load'] ) )
   {
       if( strpos( $_GET['load'] , '/language/' ) !== false )
       {
         $loadurl = file_get_contents("home.html");
         echo($loadurl);
         exit;
      }
  }
    
13.01.2017 / 06:52
2

Try to pass the variable load as a parameter in your url

index.php?load=VALOR
    
13.01.2017 / 12:13