07 2011 档案

关于php版本选择
摘要:官方给出:If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHPIf you are using PHP with IIS you should use the VC9 versions of PHPVC6 Versions are compiled with the legacy Visual Studio 6 compilerVC9 Versions are compiled with the Visual Studio 2008 compil 阅读全文

posted @ 2011-07-25 11:20 dawnruby 阅读(203) 评论(0) 推荐(0)

一句话概括MVC处理过程
摘要:首先控制器接收用户的请求,并决定应该调用哪个模型来进行处理,然后模型用业务逻辑来处理用户的请求并返回数据,最后控制器用相应的视图格式化模型返回的数据,并通过表示层呈现给用户。 阅读全文

posted @ 2011-07-12 09:16 dawnruby 阅读(307) 评论(0) 推荐(0)

Mysql 重置root密码(官方给出的方法)
摘要:Resetting the Root Password: Windows SystemsOn Windows, use the following procedure to reset the password for all MySQL root accounts: Log on to your system as Administrator. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: From t 阅读全文

posted @ 2011-07-11 15:34 dawnruby 阅读(448) 评论(0) 推荐(0)

mysql_query() 与 mysql_unbuffered_query 之间的区别
摘要:mysql_unbuffered_query(PHP 4 >= 4.0.6, PHP 5)mysql_unbuffered_query -- 向 MySQL 发送一条 SQL 查询,并不获取和缓存结果的行说明resource mysql_unbuffered_query ( string query [, resource link_identifier] )mysql_unbuffered_query() 向 MySQL 发送一条 SQL 查询 query,但不像 mysql_query() 那样自动获取并缓存结果集。一方面,这在处理很大的结果集时会节省可观的内存。另一方面,可以在获取 阅读全文

posted @ 2011-07-11 15:03 dawnruby 阅读(388) 评论(0) 推荐(0)

javascript 删除空格函数
摘要:function Trim(str){ //删除左右两端的空格return str.replace(/(^\s*)|(\s*$)/g, "");}function Ltrim(str){ //删除左边的空格return str.replace(/(^\s*)/g,"");}function Rtrim(str){ //删除右边的空格return str.replace(/(\s*$)/g,"");} 阅读全文

posted @ 2011-07-05 11:37 dawnruby 阅读(141) 评论(0) 推荐(0)

javascript验证邮箱有效性函数
摘要:function isEmail(strEmail) { if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1){ return true;}else{ alert("Email格式不正确!"); document.formSignUp.email.value=""; document.formSignUp.email.focus(); }} 阅读全文

posted @ 2011-07-05 11:36 dawnruby 阅读(658) 评论(0) 推荐(0)

mysql常用函数
摘要:bin() 十进制转二进制 ascii() 字符串最左边的字母的ascii oct() 十进制变八进制 hex() 变十六进制 char() 把每个ASCII值转成对应字母 char(77,121,83,'81.3','76') char_length() 返回字符个数 length() 返回字符串的字节数 concat(str1,str2...) 将参数连接成字符串返回,如有任何一个为null,则返回值为null locate('bar','foobarbar') 返回bar第一次出现的位置 instr('foobarb 阅读全文

posted @ 2011-07-04 16:18 dawnruby 阅读(169) 评论(0) 推荐(0)

导航