PHP 5 - Using an external URL with the function include
The option to include an external URL (ie absolute, in the form
http://site.tld/url) with the function include is disabled by default from PHP 5 and latest version. Below is the two commands to include in php.ini to activate same:
allow_url_include = 1
allow_url_fopen = 1
For more information, go to:
http://www.php.net/ ... # ini.allow-url-fopen
Note: Activating the option allow_url_include in PHP may be fatal for its security flaws if the PHP developer is negligent
An example, if you have a PHP script which includes a page based on what we give as arguments via the URL.
This means that typing
http://votresite.flet/mapage.php?page=page_a_inclure.php you include the "page_a_inclure.php.
If your code looks like this: include $ _GET ['page'], so you leave the door open for anyone to add external code. Indeed, nothing prevents me to include a php page.