PHP分页基础样式逻辑

PHP分页基础样式逻辑
今天小V帮人回答分页的问题特此写了个基础版代码,如有更好的代码请分享! $page=5; //当前页 $pageMax=20; //最大页 $page=max($page,1); $page=min($page,$pageMax); $limit=3; //左右侧显示页数 $start=$page-$limit>0?$page-$limit:1; $n=$limit>=$...

阅读全文>>

阅读全文...

ip2long转换IP时数值太大产生负数的解决方法

ip2long转换IP时数值太大产生负数的解决方法
【造成原因】:Because PHP's integer type is signed, and many IP addresses will result in negative integers. 【解决办法】:其官方手册中提到,可以“you need to use the "%u" formatter of sprintf() or printf() to get the string r...

阅读全文>>

阅读全文...

什么是移动Sitemap协议,如何提交移动Sitemap协议

什么是移动Sitemap协议,如何提交移动Sitemap协议
百度推出了移动Sitemap协议,用于将网址提交给移动搜索收录。百度移动Sitemap协议是在标准Sitemap协议基础上制定的,增加了<mobile:mobile/>标签,它有四种取值: <mobile:mobile/> :移动网页 <mobile:mobile type="mobile"/> :移动网页 <mobile:mobile ...

阅读全文>>

阅读全文...

ini_set()函数的使用以及post_max_size,upload_max_filesize的修改方法

ini_set()函数的使用以及post_max_size,upload_max_filesize的修改方法
Apache服务器处理: ini_set('display_errors', 'Off'); ini_set('memory_limit', -1); //-1 / 10240M ini_set("max_execution_time", 0); //ini_set('magic_quotes_gpc', 'On'); <IfModule mod_php5.c> p...

阅读全文>>

阅读全文...