基本介紹
- 中文名:PHP fwrite
- 語法:fwrite(file,string,length
- file:必需。規定要寫入的打開檔案
- string:必需。規定要寫入檔案的字元串
語法
fwrite(file,string,length) |
參數 | 描述 |
file | 必需。規定要寫入的打開檔案。 |
string | 必需。規定要寫入檔案的字元串。 |
length | 可選。規定要寫入的最大位元組數。 |
說明
例子
<?php
$file = fopen("test.txt","w");
echo fwrite($file,"Hello World. Testing!");
fclose($file);
?>
輸出:
21