📄 memo.class.php
字号:
<?php
class memo
{
var $file;
function __construct()
{
global $_userid;
$this->file = PHPCMS_ROOT.'data/memo/'.$_userid.'.php';
if(!file_exists($this->file)) $this->set('');
}
function memo()
{
$this->__construct();
}
function get()
{
$data = file_get_contents($this->file);
return substr($data, 13);
}
function set($data)
{
if(CHARSET != 'utf-8') $data = iconv('utf-8', CHARSET, $data);
$data = '<?php exit;?>'.$data;
return file_put_contents($this->file, $data);
}
function mtime($format = 'Y-m-d H:i:s')
{
return date($format, filemtime($this->file));
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -