輸出結(jié)果有點(diǎn)小問題
<?php
$filename = '/data/webroot/usercode/code/test2.txt';
//寫入一個(gè)字符串到$filename文件中
$str = 'abc';
$fp = fopen($filename,'w');
file_put_contents($filename,$str);
fwrite($fp,'hello');
if(file_exists($filename)){
? ?echo file_get_contents($filename);
}
?>
2015-10-13
你是不是在/data/webroot/usercode/code/沒有創(chuàng)建text2.txt ?提示錯(cuò)誤是什么?