不看评论,都不知道自己错在哪。。。看来还是太浮躁,不够认真("define" not equal to "defined"~ ~)
2015-11-27
<?php
$file=fopen("f.txt","r"); //打开文件
$con=mysql_connect("localhost","root","root"); //连接数据库
$img=imagecreate(100,100);//图形画布
?>
$file=fopen("f.txt","r"); //打开文件
$con=mysql_connect("localhost","root","root"); //连接数据库
$img=imagecreate(100,100);//图形画布
?>
2015-11-27
已采纳回答 / echo1111
fopen()就是的啊,就是这个。。http://php.net/manual/zh/function.fopen.php<?php //首先采用“fopen”函数打开文件,得到返回值的就是资源类型。$file_handle = fopen("/data/webroot/resource/php/f.txt","r");if ($file_handle){ //接着采用while循环(后面语言结构语句中的循环结构会详细介绍)一行行地读取文件,然后输出每行的文字 while (!feof(...
2015-11-27