$fp = fopen("FileName");
$content = fread($fp,10240);

解决方案 »

  1.   

    is the filename correct in windows?$filename="C:\\Documents and Settings\\Administrator\\Desktop\\file_name.csv";
      

  2.   

    How about the h
    http:///sss.ddd.ccc/aaa/fff/ss.csv
      

  3.   

    fopen -- Opens file or URL
    fgetcsv -- Gets line from file pointer and parse for CSV fields
    fputcsv --  Format line as CSV and write to file pointer 
    fclose -- Closes an open file pointer
    --------------------------------------------------------------------------
    http://cn.php.net/manual/zh/ref.filesystem.php   //Chinese (Simplified)
    http://www.php.net/manual/en/ref.filesystem.php  //English
      

  4.   

    anna8502jun 
    从楼主名字来看你是个中国人 !
    汉语有什么不好,用英文.我相告诉你的是我们认识中文哦.
    这里很少有外国人.不懂中文的外国人.
      

  5.   

    没啥。有些人的中文输入有问题。或是只能打big5码。所以打英文或拼音。可以理解。
      

  6.   

    I can not insert Chinese with this computer.
    Thanks for your understanding.
      

  7.   

    $filename="C:\\Program Files\\EasyPHP1-8\\www\\file.txt";
    $lines=file($filename);$filenamenew="C:\\Program Files\\EasyPHP1-8\\www\\filenew.txt";
    $fp=fopen($filenamenew, "w"); $count=sizeof($lines);
    for ($in=0; $in<$count; $in++)
    {
    $line=$lines[$in];
    //$line=strip_tags($line);
    //if (strlen($line)>1 ||trim($line)!='')
    //here, I want to only display the line with character
    fwrite($fp, $line);

    }echo '<pre>';
    echo file_get_contents($filenamenew);
    echo '</pre>';
    how you have any idea to fix this problem 
    ======================================the file.txt format as followingaaaaaaaaaa
    bbbbbbbbbb
    ccccccccccI want to write it into at the filenew.txtaaaaaaaaaa
    bbbbbbbbbb
    cccccccccc