我們會用到的大致上有三個函數fopen,fput,fclose,
其中fput其實就是fwrite的alias是同一個函數,
Description
- resource fopen ( string $filename , string $mode [, bool $use_include_path = false [, resource $context ]] )
$filename:欲開啟的檔案名稱
$mode:指明檔案模式(參考底下格式表)
$use_include_path:如果想在include_path搜尋檔案,就要使用這個參數,並且將
參數設為1,如果要求PHP搜尋include_path,就不需要提供目錄名稱或路徑