smarty是一个基于PHP开发的PHP模板引擎。它提供了逻辑与外在内容的分离,简单的讲,目的就是要使 用PHP程序员同美工分离,使用的程序员改变程序的逻辑内容不会影响到美工的页面设计,美工重新修改页面不会影响到程序的程序逻辑,这在多人合作的项目中 显的尤为重要。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
////dz_session.php | |
///174 行 | |
public static function updatesession() { | |
static $updated = false; | |
if(!$updated) { | |
global $_G; | |
/* $ulastactivity = authcode($_G['cookie']['ulastactivity'], 'DECODE'); | |
var_dump($ulastactivity); | |
exit;*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 对象转数组 | |
* @author 佚名 | |
* @param object $obj | |
* @return array | |
*/ | |
function object_to_array($obj){ | |
$_arr = is_object($obj) ? get_object_vars($obj) : $obj; | |
foreach ($_arr as $key => $val){ | |
$val = (is_array($val) || is_object($val)) ? $this->object_to_array($val) : $val; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 获取服务器的ip | |
* @access public | |
* @return string | |
**/ | |
function real_server_ip(){ | |
static $serverip = NULL; | |
if ($serverip !== NULL){ |
NewerOlder