background image

addslashes($content);

}

}
//返回$content
return $content;

}

编码转换

string mb_convert_encoding ( string $str , string $to_encoding [, mixed 

$from_encoding ] )

iconv();

时间

date_default_timezone_set("PRC");
date("Y-m-d H:i:s");
time();
date("Y-m-d H:i:s",time()+3600)
ini_set('date.timezone', 'PRC');
msec sec microtime() 

 

以秒返回时间戳

explode(' ', microtime())

魔术方法
    __construct() 当实例化一个对象的时候,这个对象的这个方法首先被调用。
    __destruct() 当删除一个对象或对象操作终止的时候,调用该方法。
    __get() 当试图读取一个并不存在的属性的时候被调用。
    __set() 当试图向一个并不存在的属性写入值的时候被调用。
    __call() 当试图调用一个对象并不存在的方法时,调用该方法。
    __toString() 当打印一个对象的时候被调用
    __clone() 当对象被克隆时,被调用

__isset()
__unset()
__autoload($classname)
__sleep()
__wakeup()

系统常量
    __FILE__ 当前文件名
    __LINE__ 当前行数
    __FUNCTION__ 当前函数名
    __CLASS__ 当前类名
    __METHOD__ 当前对象的方法名
    PHP_OS 当前系统
    PHP_VERSION php 版本
    DIRECTORY_SEPARATOR 

 

根据系统决定目录的分隔符

/\

    PATH_SEPARATOR 

 

根据系统决定环境变量的目录列表分隔符

; :