Inlcude with parameters This problem before I did not succeed, today saw an article decisively made, as I can so include (\ ' a.php?site=www.bkjia.c0m\ ') and then call a.php page can directly $_get[\ ' a\ ';
Detailed method
Example: Suppose you need to call Inc.php?para=3 in index.php,
inc.php
| The code is as follows |
Copy Code |
|
The following wording is not able to get the correct result:
index.php
| The code is as follows |
Copy Code |
|
With a little flexibility, the $_get variable is defined before include, and it works fine:
index.php
| The code is as follows |
Copy Code |
|
If the Allow_url_include feature is turned on in php.ini, you can use the Include URL:
index.php
| The code is as follows |
Copy Code |
|
To set the method: PHP.ini, locate the following line and change to on:
; Whether to allow Include/require to open URLs (like http:/or ftp://) as files.
Allow_url_include = On
However, to ensure security, most servers turn off the Allow_url_include feature, which can only be determined by the situation.
http://www.bkjia.com/PHPjc/628731.html www.bkjia.com true http://www.bkjia.com/PHPjc/628731.html techarticle inlcude with parameters This problem before I did not succeed, today saw an article decisive, such as I can so include (\ ' A.php?site=www.111cn.net\ ') and then in the call a.php page can be directly $_g ...