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

在Windows XP下配置PHP和Apache环境

    在windows操作系统配置PHP环境,可以用IIS做应用服务器,也可以使用Apache做应用服务器。本文介绍在Windows XP操作系统下配置PHP和Apache环境。
    准备工作:
    1、在http://windows.php.net/download/下载PHP程序包,因为用Apache做应用服务器,选择用VC6编译的PHP程序包(如果用IIS做应用服务器,选择用VC9编译的PHP程序包)。
    2、在http://httpd.apache.org/download.cgi下载Apache的安装程序apache_2.2.14-win32-x86-openssl-0.9.8k.msi。
    安装步骤:
    1、首先安装Apache,双击执行msi程序即可。
    2、安装PHP,解压zip包至c:\php中。
    3、把c:\php\php5ts.dll放到c:\windows\system32目录中。
    4、把c:\php\php.ini-development复制到c:\windows目录下,并重命名为php.ini。
    5、停止apache服务器,在Apache安装目录的conf\httpd.conf中,加入如下两行,以使 PHP 作为 Apache 的 PHP-Module 安装:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
    测试:
    1、启动Apache。
    2、编写脚本test.php,放在Apache安装目录的htdocs目录下(可以通过更改http.conf更改目录)。test.php的内容如下:
<html>
<head>
<title>
hello
</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
    3、在IE中输入:http://localhost/test.php(取决于Apache的配置,如果Apache的服务端口在8080,则为http://localhost:8080/test.php),如果显示出了PHP的配置信息就说明安装成功了。


相关文档:

PHP Security for Deployers

PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; en ......

给php代码添加phpdocumentor规范的注释

 PHPDocument是从你的源代码的注释中生成文档,因此在给你的程序做注释的过程,也就是你编制文档的过程。
  从这一点上讲,PHPdoc促使你要养成良好的编程习惯,尽量使用规范,清晰文字为你的程序做注释,同时多多少少也避免了事后编制文档和文档的更新不同步的一些问题。
  在phpdocumentor中,注释分为文档性注 ......

PHP 连接mysql

 <?
$_mysqlhost="localhost";
$_mysqluser="root";
$_mysqlpass="";
$_mysqldata="mydata";
$_connect=mysql_connect($_mysqlhost,$_mysqluser,$_mysqlpass) or die ("错误".mysql_error());
mysql_query("SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary", $ ......

php的yii框架关联查询

假如有两个表: user  和 articles 表
结构:
user: (id, name)
articles: (id,user_id,title,content)
其中user.id 和 user_id 关联
在user的 model中的 relations方法里面加:
return array('articles'=>array(self::HAS_MANY,'articles','user_id'));
在articles的 model中的 relations方法里面加:
......

PHP中mysql_fetch_array()和mysql_fetch_row()的区别

 最近在做PHP与数据库交互的project,急于求成,模仿了下例子就开始动手,结果误把mysql_fetch_array写成了mysql_fetch_row,囧事来了,发现返回的数组居然是index=>value的形式,而明明记得是field name=>value的哈,查手册才明白。
1. mysql_fetch_array的函数原型是
array mysql_fetch_array ( resour ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号