Monday 15 April 2013

php - $_GET inside include from URL? -


I have to include a file, but with $ _ get , I do not know how Explain, but I try to give examples.

I need to include a file from URL like this

  mysite.com /? = MYINCLUDETEXT   

and & lt; To write on php ('MYINCLUDETEXT.php'); ? & Gt;

Nobody tells me, thank you.

what exactly do you want to do

  if (isset ($ _GET ['file'])) {Include ($ _GET ['file']. 'Php'); }   

You may also want to check that you are trying to include the file and are actually a file and there is no folder.

But you have to understand that by doing so, you are making a big violation of your system and helping people who want to hack you upload files It is not easy to include (not only the files that were uploaded legally), but it also allows to include random files from your server.

No comments:

Post a Comment