种瓜得瓜,种豆得豆;一份耕耘,一份收获

通过 google analytics 分页页面加载时间

When a visitor lands on our landing page, we capture some timing information to measure the page load time. We’ll record that page load time in a Session scope Custom Variable. The page load time is reported to Google Analytics with the trackPageview call. The data is aggregated in Google Analytics and can be viewed [...]

admin @ 十一月 11, 2010 at 12:01 下午

IE6/IE7/Firefox浏览器不兼容原因及解决办法

浏览器的不兼容,大家肯定都是深恶痛绝的,往往我们只是去做修补,却忘了更重要的事情,那就是追溯根源,避免类似的不兼容再次出现。在下不才,归纳几点html编码要素,望能指点各位:

admin @ 十月 29, 2010 at 11:06 上午

解决xml乱码问题

将xml定义中的不合法字符替换即可. $txt = preg_replace(“/[^(\x20-\xD7FF)|(\xE000-\xFFFD)|(\x10000\-\x10FFFF)|\x9|\xA|\xD]/”,””,$txt);

admin @ 七月 13, 2010 at 4:23 上午

mac 10.6.4的alc888和hd4850驱动

本人机器是dell 530s.显卡是4850,id是 0×94421002的声卡是alc888,id是0x10ec0888 ALC888 驱动 x64_audio_for_ALC888 4850显卡 4800

admin @ 七月 9, 2010 at 18:09 下午

vsftpd 530 login error

/etc/shells权限为644,对于/etc/ftpusers同样限制权限为644,设置为 777 就会导致 ftp失败

admin @ 七月 8, 2010 at 22:41 下午

PHP多进程 win不可用

#! /usr/bin/php

admin @ 六月 30, 2010 at 14:33 下午

php 编译oci的时候出现LD_LIBRARY_PATH错误

错误信息: please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries 解决办法:如果配置过程没有问题,LD_LIBRARY_PATH在/etc/profile中也有正确的路径则检查SELINUX是否开启,如果开启,则操作:SELINUX=disabled,重启 即可解决问题 如不想重启,想立即看到结果则运行setenforce 0

admin @ 六月 11, 2010 at 15:44 下午

PHP使用CURL上传文件的函数

一般的文件上传是通过html表单进行的,通过CURL可以不经过浏览器,直接在服务器端模拟进行表单提交,完成POST数据、文件上传等功能。需要被上传的文件需要在文件名前加上“@”以示区分,并且,文件名需要是完整路径。 以下php函数来模拟html表单的提交数据: function uploadByCURL($post_data,$post_url){ $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $post_url); curl_setopt($curl, CURLOPT_POST, 1 ); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl,CURLOPT_USERAGENT,”Mozilla/4.0″); $result = curl_exec($curl); $error = curl_error($curl); return $error ? $error : $result; } 函数的使用: $url = “http://127.0.0.1/app.php”; $data = array( “username” => $username, “password” => $password, “file1″ => “@”.realpath(“photo1.jpg”), “file2″ => “@”.realpath(“file2.xml”) ); print_r(uploadByCURL($data,$url)); [...]

admin @ 六月 6, 2010 at 17:13 下午