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

路径

<?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);

原文地址:https://www.cnblogs.com/rsapaper/p/6733339.html