随笔分类 -  PHP基础

Invalid command 'RewriteEngine'解决办法
摘要:今天搭起php环境运行以前项目忽然在error.log中出现如下错误:Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration在网上找了下,解决办法:打开httpd.conf ,取消 LoadModule rewrite_module modules/mod_rewrite.so前的注释 阅读全文

posted @ 2011-09-19 17:33 魔GUI 阅读(715) 评论(0) 推荐(0)

PHP简单分页代码
摘要://SQL语句必须小写function genpage(&$sql,$page_size=2) { global $prepage,$nextpage,$pages,$sums,$page; //out param $page = $_GET["page"];if($page < 0 ) $page=0; $eachpage = $page_size; $pagesql = strstr($sql," from "); $pagesql = "select count(*) as ids ".$pagesql; $con 阅读全文

posted @ 2011-09-16 15:50 魔GUI 阅读(557) 评论(0) 推荐(0)

导航