用includevars.php
<?php$color = 'green';
$fruit = 'apple';?>test.php
<?phpecho "A $color $fruit"; // Ainclude 'vars.php';echo "A $color $fruit"; // A green apple?>
<?php$color = 'green';
$fruit = 'apple';?>test.php
<?phpecho "A $color $fruit"; // Ainclude 'vars.php';echo "A $color $fruit"; // A green apple?>
如果A.php中内容是
<?php
echo "abc";
echo "<br>";
echo "def";
?>
那b.php中的想要的结果是
变量$a = "abc
<br>
def";
$a = file_get_contents('http://xxxx/xxxx/a.php');
然后再用eval
你看可以不
file()先行。不过要用http://yourUrl这种形式。。然后读出来就行了。
这样可以获取网页的HTML代码,C#用webrequest
HTTPRequest 类,写采集程序用过的
一国外网站见过的
你的url是
本地文件就是全部内容加上HTTP后就是输入内容