function F($name, $value='', $path = DATA_PATH) {
$filename = $path . $name . '.php';
switch ($value){
case '' : goto read;
case NULL : return unlink($filename);
default :
$dir = dirname($filename); is_dir($dir) or mkdir($dir,0755,true);
return file_put_contents($filename, json_encode($value));
}
read:
if (is_file($filename)) {
return json_decode(file_get_contents($filename), true);
} else {
return false;
}
}
PHP 5.3+有效 AD:真正免费,域名+虚机+企业邮箱=0元
已抢111027个
抢已抢46937个
抢已抢133707个
抢已抢32363个
抢已抢19530个
抢