PHP

[email protected]

   

การใช้ฟังก์ชั่น เกี่ยวกับไฟล์

  • fopen(string filename, string mode [, int use_include_path [, resource zcontext]]);
      // เปิดไฟล์ string mode= r, r+, w, w+, a, a+, x, x+
  •  
  • fgets(resource handle [, int length]);  // อ่านไฟล
  • feof(resource handle);  // เช็คสิ้นสุดไฟล์
  • fclose(resource handle);  // ปิดไฟล์
  •  
    Ex.
    <?php
    $handle = fopen("inputfile.txt", "r"); while (!feof($handle)) { $buffer = fgets($handle, 4096); echo $buffer; } fclose($handle);
    ?>
      ที่มา:=> www.php.net


    สร้างเมื่อวันที่ : 15-07-2548

    เกี่ยวกับเรา | Site Map | Privacy Policy | ติดต่อเรา | ©2005 Company Name

    Hosted by www.Geocities.ws

    1