?php//php的时间是以秒算。js的时间以毫秒算date_default_timezone_set('PRC');//date_default_timezone_set('Asia/Hong_Kong');//地区//配置每天的活动时间段$starttimestr='2016... |
发表时间:2024-01-03 |
点击数:24 |
查看全文 |
?php$string='LearnPHPstringfunctionsatjb51.net';$lower=strtolower($string);$upper=strtoupper($string);print('$lower\n');print('$upper\n');pr... |
发表时间:2024-01-03 |
点击数:20 |
查看全文 |
?php$data=isset($_GET['t'])?$_GET['t']:'http://www.XXX.com';$size=isset($_GET['size'])?$_GET['size']:'150x150';$logo=isset($_GET['logo'])?$_... |
发表时间:2024-01-01 |
点击数:13 |
查看全文 |
?php//本文件和要改变的目录下的文件放在同一文件夹下define('STA','.gif');//原来的文件格式define('END','.jpg');//要改变的格式$dir='./';$arr=allfile($dir);foreach($arras$t){$t=str... |
发表时间:2024-01-01 |
点击数:22 |
查看全文 |
?phpfunctionrand_str($length,$p='all'){$nums='0123456789';$lowers='abcdefghijklmnopqrstuvwxyz';$uppers='ABCDEFGHIJKLMNOPQRSTUVWXYZ';if($p=='... |
发表时间:2024-01-01 |
点击数:17 |
查看全文 |
functioncharacet($data){if(!empty($data)){$fileType=mb_detect_encoding($data,array('UTF-8','GBK','LATIN1','BIG5'));if($fileType!='UTF-8'){$d... |
发表时间:2023-12-31 |
点击数:30 |
查看全文 |
?phpclassbihua{var$data;var$dataIndex;var$dataSpecial;var$tone;var$head;var$format;var$foot;functionsetTone($tone){$this-tone=$tone;}functio... |
发表时间:2023-12-31 |
点击数:23 |
查看全文 |
因为#在php中是注释,无法正常输出,需要转换和处理。输出页:?functionzh($str){for($i=0;$istrlen($str);$i++){if($str[$i]=='#'){$str[$i]='@';}}return$str;}?!DOCTYPEhtmlPUB... |
发表时间:2023-12-31 |
点击数:23 |
查看全文 |
?phpecho'htmlheadtitle图片/title/headbodybgcolor=000000centerfontsize=2color=red';//输出html相关代码$page=$_GET['page'];//获取当前页数$max=3;//设置每页显示图片最大张... |
发表时间:2023-12-31 |
点击数:21 |
查看全文 |
案例一代码如下:?php$file='jb51.net.php';//本案例不支持远程$fso=fopen($file,'r');echo$data=fread($fso,filesize($file));fclose($fso);?fopen()将file指定的名字资源绑定到一... |
发表时间:2023-12-31 |
点击数:17 |
查看全文 |