自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 php 操作数组 (合并,拆分,追加,查找,删除等)

1. 合并数组array_merge()函数将数组合并到一起,返回一个联合的数组。所得到的数组以第一个输入数组参数开始,按后面数组参数出现的顺序依次迫加。其形式为:array array_merge (array array1 array2…,arrayN) 这个函数将一个或多个数组的单元合并起来,一个数组中的值附加在前一个数组的后面。返回作为结果的数组。如果输入的数组中有相...

2011-09-27 21:12:00 1016

原创 php 检测网址是否有效

1.  网址的格式: function checkUrl($weburl) { return !ereg("^http(s)*://[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*$", $weburl); } 2 . 判断http 地址是否有效 function url_exists($url){ $ch = curl_init();...

2011-09-23 22:43:32 1251

原创 php 创建短地址 (var_export)

提交页面 shorten.php:  <form method="post" action="show.php"> <input type="text" name="url" value="" style="width:800px;padding:3px 7px;" /> <input type

2011-09-23 05:18:02 122

原创 php创建短ID Create short IDs with PHP - Like Youtube or TinyURL

  More is Less - the 'math'The alphabet has 26 characters. That's a lot more than 10 digits. If we also distinguish upper- and lowercase, and add digits to the bunch or the heck of it, we alread...

2011-09-22 23:10:37 355

原创 php 手机系统 php-mobile-detect

1. php  mobile detect  <?php/** * Mobile Detect * * @license http://www.opensource.org/licenses/mit-license.php The MIT License * @version SVN: $Id: Mobile_Detect.php 4 2011...

2011-09-20 22:37:55 341

原创 php实现url伪静态化,全过程详解

 url的静态化,我一般借助于apache,nginx,htaccess等,很少用php来实现url的静态化,用php来实现静态化比较麻烦,所以就个人而言是不推荐使用php来实现url静态化 一,url的静态化实现的原理 1,通过程序来把动态的url转换成静态的url,转换方法最好是统一的接口。把静态的url放到html中,这样我们通过页面看到的就是静态的url。 2,...

2011-09-20 04:31:15 492

原创 iphone/ipod网页开发教程及规则

侦测iPhone/iPod 开发特定设备的移动网站,首先要做的就是设备侦测了。下面是使用Javascript侦测iPhone/iPod的UA,然后转向到专属的URL。 if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {if (document.c...

2011-09-20 04:04:56 217

原创 iPad网页开发教程及规则

 iPad开发的局限性在iPad上使用Safari浏览普通网站网页的时候,网页因为太大而导致需要手动放大缩小或者滑动,虽然这种滑动行为在iPad上市之初的各种宣传中被津津乐道,但时间久了我们还是会发现这样做并不方便,给用户带来的感受并不十分好。不支持Flash在没有越狱的iPad Safari中,网站的Flash都是无法显示的,但可以通过第三方软件或插件或者浏览器来解决,不过,即...

2011-09-20 03:57:34 216

原创 查看ipad网页代码 iPad Quick Tip – View Page Source In iPad Safari

 If you are a webmaster like me, and always wondered how to check the source of your web pages via your iPad, search no more: the folks at RavelRumba put together a nice “bookmarklet” that will allo...

2011-09-17 05:48:53 454

原创 判断来访者所用设备是iPhone、iPad或者电脑(PC)

iPad 使用的是 Safari Mobile 浏览器,他的的 User Agent 是:  Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10...

2011-09-07 03:22:28 167

原创 php合成或者创建gif动画

1. 首先需要确认GD库是否正常。2. 如何是合成图片,请确保把分解的图片放在frames的文件夹里面。3. GIFEncoder.class.php 类 <?Class GIFEncoder { var $GIF = "GIF89a"; /* GIF header 6 bytes */ ...

2011-09-03 02:51:21 318

原创 防止伪造跨站请求

关联:征服 Ajax 应用程序的安全威胁AJAX 跨域请求 - JSONP获取JSON数据 跨站脚本在媒体的帮助下,跨站脚本(XSS)成为了大家关注的焦点,当然它是绝对应当关注的。XSS 是 web 应用中最常见的安全隐患,许多流行的开放源代码的 PHP 应用程序受到 XSS 隐患的困扰。XSS 攻击发生在下面的情况下:对于...

2011-09-03 02:22:57 172

原创 JavaScript 弹出窗口 (latimes版)

 <script>windoids = new Array();function windoid (url, name, width, height, props, autoClose) { var winProps; // If the props argument isn't specified, make the window resizable a...

2011-09-02 02:46:27 112

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除