Posted on December 14, 2011, 9:46 pm, by luckymouse, under
Codes & Scripts.
虽然网上有很多一键安装包,但是如同PHP官方警告的,从官方下载单独安装包才是最好的选择。 安装Apache: http://httpd.apache.org/download.cgi 选择最新的安装包: Win32 Binary including OpenSSL 0.9.8r (MSI Installer): httpd-2.2.21-win32-x86-openssl-0.9.8r.msi 下载好后,直接打开就可以安装了。选择Custom,可以自由配置路径和模块。 提示:使用迅雷等工具下载,安装前一定要关闭掉迅雷,否则会因为80端口被占用而导致Apache启动失败! 安装PHP: http://windows.php.net/download/ 除了Windows Nt,一定要记得选择线程安全的安装包: Installer VC9 x86 Thread Safe (2011-Aug-23 12:01:10) PHP 5.3 (5.3.8) 下载完成后打开即可安装,按照安装提示操作即可。 提示:可能出现以下错误: there is a problem with this Windows Installer package.A script required for this install to complete could not be run.Contact support personnel or package vendor [...]
I want to formart a simple string in PHP. There are two ways to do this. One is vsprintf and another preg_replace. But who is faster? I have tested both of them. I find that vsprintf run more faster while can parse string in many formart. So why not use vsprintf to replcae preg_replace if [...]
I like to use innerHTML . It is fast and easy to use. But there are some problems under different browsers, such as innerHTML can’t use to insert to table elements under IE. I have search on google with this issue. There are no good idea to fix innerHTML to table. Someone use Jquery append [...]
字符 描述 \ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个后向引用、或一个八进制转义符。例如,’n’ 匹配字符 “n”。’\n’ 匹配一个换行符。序列 ‘\’ 匹配 “” 而 “\(” 则匹配 “(“。 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 ‘\n’ 或 ‘\r’ 之后的位置。 $ 匹配输入字符串的结束位置。如果设置了RegExp 对象的 Multiline 属性,$ 也匹配 ‘\n’ 或 ‘\r’ 之前的位置。 * 匹配前面的子表达式零次或多次。例如,zo* 能匹配 “z” 以及 “zoo”。 * 等价于{0,}。 + 匹配前面的子表达式一次或多次。例如,’zo+’ 能匹配 “zo” 以及 “zoo”,但不能匹配 “z”。+ 等价于 {1,}。 ? 匹配前面的子表达式零次或一次。例如,”do(es)?” 可以匹配 [...]
I got a error to use a 2M string in php code.But the php settings memory limit is 8M. Fatal error: Allowed memory size of **** bytes exhausted (tried to allocate *** bytes) Then I check the php code, I find there are some codes cost more memory. $tmp = “string”.$tmp.”string”; I change those codes [...]
<?php // 3/20/2008 – Updated by Roger Collins (http://www.rogercollins.com/) // to remove graphing step //PageRank Lookup v1.1 by HM2K (update: 31/01/07) //based on an alogoritham found here: http://pagerank.gamesaga.net/ //settings – host and user agent $googlehost=‘toolbarqueries.google.com’; $googleua=‘Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5′; echo getpr(“http://www.xydw.com”); //convert a string to a 32-bit integer function [...]
http://www.n-son.com/scripts/jsScrolling/jsScrollbar.html it is a very good and useful scripts. Preparation Before initializing the scrollbar, you must create a jsScroller object. So if you haven’t, follow the previous tutorial and find out how! First thing is the HTML: <div id=”Scrollbar-Container”> <div class=”Scrollbar-Up”></div> <div class=”Scrollbar-Down”></div> <div class=”Scrollbar-Track”> <div class=”Scrollbar-Handle”></div> </div> </div> Again, “Scrollbar-Container” can be change to [...]
In some wordpress themes may be you would find some links can not be modified, even if you can not find where there are. How to modify them?Follow me… First you find the file which you think those links will be. Then try search by some tools such as Notes, ZDE. If you do not [...]