非常简单的php问题,
例如,demo.php只返回一个像这样的"你好"的文本.
我如何从另一个php页面获取此文本?
更新:
实际上我的意思是页面输出就像这个"打印'你好';"
我想从特定网址获取动态内容:
我用过了代码
echo $content=file_get_contents('http://www.punoftheday.com/cgi-bin/arandompun.pl');
Run Code Online (Sandbox Code Playgroud)
我得到以下结果:
document.write('"Bakers have a great knead to make bread."
') document.write('© 1996-2007 Pun of the Day.com
')
Run Code Online (Sandbox Code Playgroud)
我怎么能得到这个字符串 面包师有很大的揉成面包. 只有第一个document.write里面的字符串会改变,其他代码将保持不变
问候,
潘卡
php ×2