posted @ 2014-07-18 22:26 SmarTom 阅读(156) 评论(0) 推荐(0)
摘要:
一:创建文件 touch("文件名")二:删除文件 unlink("文件路径");三:移动文件 (重命名文件) rename("当前的文件路径","目标文件路径");四:复制文件 copy("当前文件路径","目标文件路径");文件的创建和读写: 读取文件: 1.file_get_c... 阅读全文
摘要:
一: 文件类型判断:1.is_dir() 判断是不是目录2.is_file() 判断是不是文件3.is_executable() 判断是不是可执行文件4.is_readable() 判断是不是可读文件5.is_writable() 判断是不是可写文件6.is_link() 判断是不是快捷方式二:文件... 阅读全文
posted @ 2014-07-18 22:07 SmarTom 阅读(352) 评论(0) 推荐(0)
摘要:
非select 语句(没有结果集的)1.建立连接数据库 $mysqli=new mysqli("localhost","root","","sqldb");2.判断 if(mysqli_connect_error()){ echo "连接数据库失败".mysqli_connect_erro... 阅读全文
posted @ 2014-07-18 00:23 SmarTom 阅读(316) 评论(0) 推荐(0)
摘要:
$mysqli=@new mysqli('localhost','root','','sqldb'); if(mysqli_connect_errno()){ echo "链接错误".$mysqli->error.":".$mysqli->errno; } /... 阅读全文
posted @ 2014-07-16 22:27 SmarTom 阅读(186) 评论(0) 推荐(0)
摘要:
使用multi_query(); 去执行SQL语句,执行多条语句多个SQL语句用“;”分开一:没有结果集的语句:$sql="insert into products (cid,name,price,num) values('2','PHP','2.22','10');update products ... 阅读全文
posted @ 2014-07-15 00:05 SmarTom 阅读(1743) 评论(0) 推荐(0)
摘要:
一:链接数据库:$mysqli=@new mysqli("localhost","root","123456","msqldb");二:判断链接是否成功: if(mysqli_connect_errno()){ echo "连接数据库失败:".mysqli_connect_error; ... 阅读全文
posted @ 2014-07-10 03:40 SmarTom 阅读(605) 评论(0) 推荐(0)
摘要:
一:链接数据库 mysql_connect("localhost","root","123456") or die("连接数据库失败"); mysql_pconnect();//持久链接二:选择数据库: mysql_select_db("mysqldb") or die("数据库选择失败");... 阅读全文
posted @ 2014-07-10 01:56 SmarTom 阅读(345) 评论(0) 推荐(0)
摘要:
1. $.each(array, [callback]) 遍历[常用]解释:不同于例遍 jQuery 对象的 $().each() 方法,此方法可用于例遍任何对象(不仅仅是数组哦~). 回调函数拥有两个参数:第一个为对象的成员或数组的索引, 第二个为对应变量或内容. 如果需要退出 each 循环可使... 阅读全文
posted @ 2014-07-09 14:52 SmarTom 阅读(275) 评论(0) 推荐(0)
摘要:
一:字符串函数: 1.concat(); concat(S1,S2,S3,......Sn); 把传入参数链接 成一个字符串; 2.insert(); insert(str,x,y,insert); st r: 传入的字符串, x : 从第几个开始 y :需要替换几个字符 insert : 替换的字 阅读全文
posted @ 2014-07-04 23:54 SmarTom 阅读(649) 评论(0) 推荐(0)
浙公网安备 33010602011771号