if条件判断中,0,NULL,‘‘都是false
session方法
session(‘_userID‘, $userInfo[‘userID‘]);
//切换数据库
$infoClass = M()->db(1,C(‘DB_CONFIG_SYN‘))->table(‘syn_userinfo‘);
//字符串替换
<?php
echo strtr("Hilla Warld","ia","eo");
?>
输出:Hello World
//编码转换
$content = iconv("utf-8","gb2312//IGNORE",$content);
时间: 2024-09-29 17:20:29