路径
<?php define('CMDPATH', 'wD:cmd\'); echo CMDPATH; die();
broswer 路径无问题
w
读 用
<?php $wfile = 'D:cmdwfonen.html'; $handle = fopen($wfile,'r'); $contents = fread($handle,filesize($wfile)); fclose($handle); var_dump($contents);
存 更新
<?php $wfile = fopen('D:cmdwfonen.html', 'w'); var_dump($wfile); fwrite($wfile, 'w'); unset($wfile); $wfile = fopen('D:cmdwfonen3.html', 'w'); fwrite($wfile, 'w'); var_dump($wfile); die();
<?php $wfile = fopen('D:cmdwfonen.html', 'w'); var_dump($wfile); fwrite($wfile, '232323'); unset($wfile); $wfile = fopen('D:cmdwfonen3.html', 'w'); fwrite($wfile, '232323'); var_dump($wfile);