易截截图软件、单文件、免安装、纯绿色、仅160KB

php连接mysql

header("Content-Type:text/html;charset=utf8");   放到PHP开头处
$link=mysql_connect("localhost","root","110110");//链接
mysql_select_db("blog",$link);//选择数据库
mysql_query("SET character_set_results=gbk", $link);//字符编码


相关文档:

php 程序的国际化gettext

步骤一:搭建环境
1,首先查看你的php扩展目录下是否有php_gettext.dll这个
文件,如果没有,这就需要你
下载一个或是从其他地方拷贝一个,然后放到php扩展目录。
2,打开php.ini,查
找”;extension=php_gettext.dll“ ,然后去除注释,重启apache。
步骤二:原理讲解
假如你的没
有国际化的程序里有这样 ......

PHP autoload机制详解

(1) autoload机制概述
在使用PHP的OO模式开发系统时,通常大家习惯上将每个类的实现都存放在一个单独的文件里,这样会很容易实现对类进行复用,同时将来维护时也很便利。这也是OO设计的基本思想之一。在PHP5之前,如果需要使用一个类,只需要直接使用include/require将其包含进来即可。下面是一个实际的例子:
CODE:
/* ......

php Mod rewrite test

In the directory where you plan to install Elgg, do the following:
Create the file .htaccess and add these two lines
RewriteEngine on
RewriteRule ^testing.php$ modrewrite.php
This tells the webserver to load modrewrite.php when testing.php is
requested.
In order to get this test to work on ......

CentOS通过yum升级php到5.2.9版本的方法

CentOS的php版本默认为5.1.6,然后在5.2.9版本之前的的php都存在一个漏洞,但是目前网上很多地方都无法使用yum update php*升级到5.2.9,比较常见的是升级到5.2.6版本的,经过搜索国外资料,现在终于找到一种升级CentOS的php到5.2.9的方法。
运行下面命令:
# wget http://download.fedora.redhat.com/pub/epel/5/i386/ep ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号