这是php manual的原话:将 web 页面读入字符串。参见 file_get_contents()。
$html = implode('', file ('http://www.example.com/'));为什么我用这段代码不行的?1.<?php
2.
3.var $html;
4.$html = implode('', file ('http://www.baidu.com/index.html'));
5.echo '$html';?>错误提示:Parse error: parse error in d:\usr\www\ip\ip.php on line 3
$html = implode('', file ('http://www.example.com/'));为什么我用这段代码不行的?1.<?php
2.
3.var $html;
4.$html = implode('', file ('http://www.baidu.com/index.html'));
5.echo '$html';?>错误提示:Parse error: parse error in d:\usr\www\ip\ip.php on line 3
解决方案 »
- 如何抓取当前IE中的浏览页!!!!!!!!!!!!!!!!!!!!!!!!!
- zend studio 8.0使用问题,请指教
- PHP与js的交互问题!
- 关于PHP编译时freeTDS的报错问题
- phpinfo里面Virtual Directory Support 是disabled是怎么回事
- mysql返回多少数据
- 如何将网页中指定的字符串标红?
- 请问大家,为什么我在php5上配的smarty就能很好的支持session,而在php4上配置的smarty就好像对session的支持有BUG呢?
- 为什么我无法上传。
- 如何隐藏真实的文件名?
- 超级郁闷的十一
- 在线求助PHP关于URL编码和解码的问题
2.
3.$html = implode('', file ('http://www.baidu.com/index.html'));
4.echo $html;
5.
6.?>错误提示:Parse error: parse error in d:\usr\www\ip\ip.php on line 3去掉iplode也是不行的。
$html = implode(' ', file ( 'http://www.baidu.com/index.html '));
echo $html;
?>