I didn’t succeed in inlcude with parameters before. Today I saw an article and solved it decisively. For example, I can include('a.php?site=www.bKjia.c0m') and then call the a.php page. It can be obtained directly via $_GET['a'];.
Detailed explanation of specific methods
Example: Suppose you need to call inc.php?para=3 in index.php,
inc.php
The code is as follows
|
Copy code
|
The following writing method cannot get the correct result:
index.php
The code is as follows
|
Copy code
|
With a slight change, define the $_GET variable before include, and it will run normally:
index.php
The code is as follows
|
Copy code |
|
If the allow_url_include function is turned on in php.ini, you can use the include url method:
index.php
The code is as follows
|
Copy code
|
Setting method: In php.ini, find the following line and change it to On:
allow_url_include = On
However, in order to ensure security, most servers turn off the allow_url_include function, so it depends on the situation.
http://www.bkjia.com/PHPjc/628731.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/628731.htmlTechArticleI have not succeeded in inlcude with parameters before. I saw an article today and solved it decisively. If I can do this include('a.php?site=www.111cn.net') and then directly $_G... when calling the a.php page
|
|
|