这是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
解决方案 »
- 输出图片乱码?求解答
- 如何直接使用参数传递或者其它方法执行被注释掉的代码行选项?
- 求助:增加一段播放音乐的代码!!!!!!!!!
- 求助,我想做个PHP论坛,程序在一个地址A,数据库在一个地址B,谁知道怎么做???
- 什么时候用mysql_connect?什么时候用mysql_pconnect?
- 热烈庆祝本人终于在光棍节的今天找到自己的感情归宿!!大送20分![以后会不定期的大送哦]
- 删除session 新问题
- 如何用php+MySql实现分级权限管理?
- 安装论坛过程中遇到的问题!!!!!!
- 用PHP面向对象做了一个计算器,在计算界面输入后,会转到CalProcess.php,但是不显示结果
- 超级郁闷的十一
- 在线求助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;
?>