Home  >  Article  >  php教程  >  PHP学习笔记

PHP学习笔记

WBOY
WBOYOriginal
2016-06-13 08:54:26741browse

PHP学习笔记

strpos($str1,$str2[$offset]);str1中搜索str2,返回第一次出现的位置,头是0;

echo `ipconfig`;等效于echo shell_exec('ipconfig');

echo @(3/0);

&&,||,短路优先级最高

echo date("Y年m月d日 H:i:s");

echo date("Y-m-d H:i:s");

echo date("Y/m/d H:i:s",time())

echo date("Y/m/d H:i:s",time()+24*3600)

echo date('w');

date_default_timezone_get();得到当前的默认时区

date_default_timezone_set();设置时区/PRC Asia/Shanghai

echo ini_get('date.timezone'); ini_set('date.timezone','PRC')

wKiom1X4K9rSQqGQAAGVpFw1orQ188.jpg

isset($var)是否设置;empty($var)是否为空;可套在var_dump();内

exit; die('Game Over!');终止执行

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn