is_numeric() 判断是否是数字或者是数字字符串
strlen() 函数返回字符串的长度
substr() 函数返回字符串的一部分。
substr_replace 替换字符串
<?php
echo substr_replace("Hello world","earth",6); // 结果为 Hello earth
?>
strtotime() 转换时间戳
explode() 将字符串切割为数组
file_exites() 检测文章存在否;
mkdir() 创建 文件夹;
strtolower 将所有的字符转换为小写;
document.getElementById() 获取的是对象 不符合时返回的是null ;
js 判断中 if( $ABC == "") 为空的话 要用双引号;
if($result == null)
{
return false;
}else{
return true;
}
exit() 函数输出一条消息,并退出当前脚本。该函数是 die() 函数的别名。exit(status);
例如:
1.if(!$id) exit("<script>alert('参数错误!');window.location.href='http://www.tongzhuo100.com/manager/shop/'</script>");
2.echo exit(json_encode(array('flag' => 104, 'message' => '对不起,不支持的图片类型!')));
js 定时器分两种 一个是倒计时计时器 另外一个是循环定时器;
$where = "user_name='$userName'";