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

windows下apache,mysql,php安装日记

今天废了一天的时间来从新把环境搭建好:做个笔记
安装顺序:
apache->php->mysql
一些注意的地方记下来吧:
1. apache 支持 php
    apache 配置文件下:需要修改的地方:
       i.  PHPIniDir "F:/programs/php/"
       ii. LoadModule php5_module "F:/programs/php/php5apache2_2.dll"
2.  php 的设置
       i. include_path
       ii. extension_dir
3. php 连接 mysql
      i. 注释掉相关 extension
      ii. extension = php_mysql.dll
      iii. 或者 extension = php_pdo.dll, extension = php_pdo_mysql.dll
      iiii. 还有些会用到的相关的 extension
4. 设置虚拟服务器
      i. 在 apache 配置文件里以 Include 方式加载
          eg. Include F:/some/path/vitual_host.conf
      ii. 然后再 vitual_host.conf 中设置相关虚拟主机
5. 绑定域名
     i. 在 C:\WINDOWS\system32\drivers\etc 下的 host 文件中加上 域名- ip 映射关系
         eg. 127.0.0.1 www.example.com example.com
说明:
php 有两种方式安装
  i. 下载安装程序 msi 文件
  ii. 下载 zip 文件,这个需要较多自己配置
php 的测试工具 xDebug 将下面的放到 php.ini 中
[xdebug]
zend_extension_ts="F:\programs\php\ext\php_xdebug-2.0.5-5.2.dll"
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = cachegrind.%p.out
xdebug.profiler_output_dir = "F:\programs\php\tmp\XDebug"
-----XDebug 的相关文档在: http://www.xdebug.org/docs/profiler


相关文档:

php list方法的妙用

一个简单的例子读取CSV文件:
<?php
$handle=fopen("test.csv","r");
echo "<table border=2>";
//配合while循环读取文件
while($data=fgetcsv($handle,1024))
{
list($user,$pwd,$partment,$title)=$data;
echo "<tr>
<td>$user</td>
<td>$pwd< ......

关于PHP的几点问题及解决方法

1.配置IIS下的PHP环境
我用的是Windows server 2003+IIS 6.0+PHP,但刚开始用的PHP5.3,按照网上的方法http://www.gzu521.com/campus/article/network/200902/182924.htm一步步配置,但是结果运行出现了一个问题,就是The FastCGI Handler was unable to process the request.找了很多解决方法但是还是没有解决,最后我换成 ......

php分页类

<?php
class SubPages{

private $each_disNums;//每页显示的条目数
private $nums;//总条目数
private $current_page;//当前被选中的页
private $sub_pages;//每次显示的页数
private $pageNums;//总页数
private $page_array = array();//用来构造分页的数组 ......

php连接access


php连接access
 
 
$conn=new COM("ADODB.Connection");
$dsn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=".realpath("data.mdb").";Uid=Admin; Pwd=BDC2002Data;";
$conn->open($dsn); 
$sql="select * from dict"; 
$rs=$conn->Execute($sql);
$row="0";
while(!$rs->EO ......

PHP Cookie与Session跨域访问、传递


晚上特意花了个时间,自己动手试了下。
在项目中一直碰到Cookie跨域访问及SessionId跨域传递问题
范例:
index.php
<?php
include_once('a.php');
session_start();
$_SESSION['k'] = uniqid();
setcookie("sess", session_id(), time()+3600, "/", ".ipggg.com");
echo "index.php<br />\n";
echo $ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号