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...

阅读全文>>

阅读全文...

thinkphp运行时间中的Exec:缓慢

thinkphp运行时间中的Exec:缓慢
作者:罪惡 发布于:2013-7-9 13:38 Tuesday 数据库 最近在windows上开发应用的时候发现一个有趣的问题:我的本地程序连接本地mysql库居然要延迟1秒钟左右才能打开。 问题分析 考虑到可能是程序性能问题后,我使用了xdebug的性能日志功能输出程序运行日志后发现连接mysql的函数时间居然用掉了接近95%的执行时间。 确认是mysql性能问题后,考虑是mysql的...

阅读全文>>

阅读全文...

thinkphp IIS下伪静态配置

thinkphp IIS下伪静态配置
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="OrgPage" stopProcessing="true"> <mat...

阅读全文>>

阅读全文...

webuploader 解决不能重复上传问题

webuploader 解决不能重复上传问题
根据查看webuploader文档 里面有个duplicate属性,是可选的,  true为可重复   ,false为不可重复   默认为undifind  也是不可重复。 所以只需在属性的后面追加duplicate:true  就可以实现重复上传。 uploader = WebUploader.create({ swf: 're...

阅读全文>>

阅读全文...

webuploader php解决中文文件上传问题

webuploader php解决中文文件上传问题
<?php // Make sure file is not cached (as it happens for example on iOS devices) header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); ...

阅读全文>>

阅读全文...