<?
$fp = fopen("/home/rasmus/file.txt", "r");
$fp = fopen("c:\\mydata\\info.txt", "r");
$fp = fopen("http://www.php.net/", "r");
$fp = fopen("ftp://user:[email protected]/", "w");
?>
你打开一个文件如没有的话他就会自动的建立.
同理.你可以用fread来读文件.
<?php
$filename = "/usr/local/myfile.txt";
$fd = fopen( $filename, "r" );
$contents = fread($fd, filesize($filename));
fclose( $fd );
?>
不知道是不是你要的
$fp = fopen("/home/rasmus/file.txt", "r");
$fp = fopen("c:\\mydata\\info.txt", "r");
$fp = fopen("http://www.php.net/", "r");
$fp = fopen("ftp://user:[email protected]/", "w");
?>
你打开一个文件如没有的话他就会自动的建立.
同理.你可以用fread来读文件.
<?php
$filename = "/usr/local/myfile.txt";
$fd = fopen( $filename, "r" );
$contents = fread($fd, filesize($filename));
fclose( $fd );
?>
不知道是不是你要的
谢谢上面老兄
设置问题,你可以在这里搜索一下,有几篇文章写了这方面的