`
文章列表
<?php header('Content-Type: text/html; charset=utf-8'); class ValidatePost{ //验证是否为指定长度的字母/数字组合 function alphabetLeng($num1,$num2,$str) { return (preg_match("/^[a-zA-Z0-9]{".$num1.",".$num2."}$/",$str))?true:false; } //验证是否为指定长度数 ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JQ省市区联动</title> </head> <body> <select name="" id="province" onchange="pro(this.value)"> <option value="0& ...
<?php header('Content-Type: text/html; charset=utf-8'); //序列化和反序列化 //你是否会把一个比较复杂的数据结构存到数据库或是文件中?你并不需要自己去写自己的算法。 //PHP早已为你做好了,其提供了两个函数:serialize() 和 unserialize(): $str = array('chaoyi','onestopweb.iteye.com','阅谁问君诵,水落清香浮。'); //序列化 $str2 = serialize($str); echo $str2.PHP_EOL; //反序列化 ...
demo.php <?php header('Content-Type: text/html; charset=utf-8'); @session_set_cookie_params(3600, "/", "onestopweb.iteye.com", false, TRUE); //启动新会话或者重用现有会话 session_start(); //配置 Seeeion $_SESSION['data'] = array('user'=>'chaoyi','website'=>'onestopweb.iteye ...
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> </head> <body> <script type="text/javascript"> var ua = navigator.userAgent.toLowerCase(); var isWeixin = ua.indexOf('micromessenger') != -1; va ...
<?php header('Content-Type: text/html; charset=utf-8'); //PHP时间戳函数获取指定日期的unix时间戳 echo strtotime('2018-1-19').PHP_EOL; echo time().PHP_EOL; //PHP时间戳函数获取英文文本日期时间 echo date('Y-m-d H:i:s', 1516291200).PHP_EOL; echo date('Y-m-d H:i:s', time()).PHP_EOL; //打印明天此时的时间戳 echo date('Y-m-d H:i: ...
<?php header('Content-Type: text/html; charset=utf-8'); $file = fopen("test.txt", "r"); $contArr=array(); $i=0; //输出文本中所有的行,直到文件结束为止。 while(! feof($file)) { $contArr[$i]= fgets($file);//fgets()函数从文件指针中读取一行 $i++; } fclose($file); $contArr=array_filter($cont ...
demo.css .box{ width:400px; margin:0 auto;} .bcon{ width:270px; border:1px solid #eee; margin:30px auto;} .bcon h1{ border-bottom:1px solid #eee; padding:0 10px;} .bcon h1 b{ font-size:14px; line-height:40px; border-top:2px solid #3492D1; padding:0 8px; margin-top:-1px; display:inline-block;} ...
<?php header('Content-Type: text/html; charset=utf-8'); class get_gust_info { //获得访客浏览器类型 function GetBrowser(){ if(!empty($_SERVER['HTTP_USER_AGENT'])){ $br = $_SERVER['HTTP_USER_AGENT']; if (preg_match('/MSIE/i',$br)) { $br = 'MSI ...
1、说明:创建数据库 CREATE DATABASE database-name 2、说明:删除数据库 drop database dbname 3、说明:备份sql server --- 创建 备份数据的 device USE master EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat' --- 开始 备份 BACKUP DATABASE pubs TO testBack 4、说明:创建新表 create table tabname(col1 type1 [not null ...
Snow.css #lace{ position: fixed; z-index: 5; width: 100%; height: 100%; } #Snow0{ height: 100%; width: 100%; top: 0; left: 0; position: absolute; z-index: 99 } .frost{ height: 99px; background-size: 60%; background: url('top.png' ...
<?php class SysCrypt { private $crypt_key; public function __construct($crypt_key) { $this -> crypt_key = $crypt_key; } public function php_encrypt($txt) { srand((double)microtime() * 1000000); $encrypt_key = md5(rand(0,32000)); ...
1、用单引号代替双引号来包含字符串,这样做会更快一些。因为PHP会在双引号包围的字符串中搜寻变量,单引号则不会,注意:只有echo能这么做,它是一种可以把多个字符串当作参数的“函数”(译注:PHP手册中说echo是语言 ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charse ...
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <title>根据链接修改对应的内容</title> </head> < ...
Global site tag (gtag.js) - Google Analytics