php cmd 不能利用$_COOKIE 的处理 通过文件来暂存字符串

路径

 

<?php
define('CMDPATH', 'wD:\cmd\\');
echo CMDPATH;
die();

 

 

broswer 路径无问题

w

读 用

<?php

$wfile = 'D:\cmd\wfonen.html';
$handle = fopen($wfile,'r');
$contents = fread($handle,filesize($wfile));
fclose($handle);
var_dump($contents);

 

 

存 更新

<?php
$wfile = fopen('D:\cmd\wfonen.html', 'w');
var_dump($wfile);
fwrite($wfile, 'w');
unset($wfile);
$wfile = fopen('D:\cmd\wfonen3.html', 'w');
fwrite($wfile, 'w');
var_dump($wfile);


die();

 

 

 

 

<?php
$wfile = fopen('D:\cmd\wfonen.html', 'w');
var_dump($wfile);
fwrite($wfile, '232323');
unset($wfile);
$wfile = fopen('D:\cmd\wfonen3.html', 'w');
fwrite($wfile, '232323');
var_dump($wfile);

 

posted @ 2017-04-19 14:28  papering  阅读(230)  评论(0)    收藏  举报