PhpWind教程:Windows環(huán)境下PHP5開發(fā)配置指南_PhpWind教程
Windows環(huán)境下PHP5開發(fā)配置指南
開發(fā)平臺:
WindowsXP 下
php-5.1.6-Win32
mysql-5.0.18-win32
Smarty-2.6.14
Date-1.4.6.tar
DB-1.7.6.tar
MDB2-2.3.0.tar
Validate-0.6.5.tar
DB_DataObject-1.8.4.tar
工具:
phpMyAdmin-2.9.0.2
一、PHP的安裝與配置
PHP配置步驟
1、PHP5的下載和安裝
將解壓縮后的php-5.1.6-Win32中的文件拷貝到C:\php5\下面。
2、配置PHP
a>復(fù)制 C:\PHP5\目錄下的 php5ts.dll 文件到C:\WINDOWS\system32目錄中。
b>將C:\PHP5\目錄下的php.ini-recommended文件拷貝到c:\WINDOWS中,并改名為php.ini。
注意:如果使用了 NTFS,確保運行webserver 的用戶對 php.ini 有讀取的權(quán)限(例如使其對Everyone 可讀,需將c:\WINDOWS設(shè)置為WEB共享)。
c>加載對http://localhost/phpMyAdmin/
四、smarty的配置
1、安裝
在D:\www\test下新建目錄comm。
從http://smarty.php.net/do_download.php下載最新包,將libs中所有文件拷入comm目錄,完成基本安裝。
2、配置
在D:\www\test下新建目錄cache、config、templates、templates_c
在D:\www\test下新建PHP程序文件index.php。如下:
<?php
require 'comm/Smarty.class.php';
$smarty = new Smarty;
$smarty->template_dir = 'templates';
$smarty->compile_dir = 'templates_c';
$smarty->config_dir = 'config';
$smarty->cache_dir = 'cache';
$smarty->caching = false;
$smarty->left_delimiter = "<!--";
$smarty->right_delimiter = "-->";
$var = 'Hello World!';
$smarty->assign('hello',$var);
$smarty->display('index.tpl');
?>
在D:\www\test\ templates下新建http://localhost/test/index.php
done...
五、DataObject的配置
1、下載
DataObject是PEAR的一部分。它與另外4個模塊相關(guān)。所以在安裝它之前,要先安裝PEAR,然后安裝其他4個模塊:DB、DATE、MDB2、和Validate。如果是PHP5安裝包的話,在C:\PHP5\ 目錄下會帶有g(shù)o-pear.bat工具。點擊運行它,然后在C:\PHP5\目錄下會看到pear.bat(真多余,但沒辦法。。。)
到http://pear.php.net/packages.php下載5個包,我下的是DB-1.7.6.tar、Date-1.4.6.tar、MDB2-2.3.0.tar、Validate-0.6.5.tar和DB_DataObject-1.8.4.tar。拷貝到C:\PHP5\ 目錄下。這里面,我們要用到的DB_DataObject包必須最后安裝。
2、安裝
依次安裝DB、DATE、MDB2、和Validate,最后是DataObject。
在命令行模式下,轉(zhuǎn)到C:\PHP5\。運行:
Pear install DB-1.7.6.tar
Pear install Date-1.4.6.tar
Pear install MDB2-2.3.0.tar
Pear install Validate-0.6.5.tar
Pear install DB_DataObject-1.8.4.tar
OK!
3、配置
我的http://localhost/test/test.php
OK! …
- PhpWind教程:PHPWind forum V7.5 SP1 使用與修復(fù)說明
- PhpWind教程:PHPWind Forum V7.5 升級教程
- PHPWind7.3 升級7.3.2 圖文教程
- PhpWind教程:sitemap生成問題
- PhpWind教程:熱榜排行 for 75
- PHPwind 6.3.2升級至PHPwind 7.3.2 圖文教程
- PHPWind 7.0 升級至PHPwind 7.3.2 圖文教程
- PHPWind 7.0 升級到PHPwind v7.3 圖文教程
- PHPWind 6.3.2升級到 PHPwind v7.3 圖文教程
- PHPWind6.3.2升級PHPWind7.0說明教程
- PhpWind教程:PHPWind6.3(6.3rc、6.3) to PHPWind6.3.2升級教程
- PhpWind教程:PHPWind6.x(6.0rc、6.0) to PHPWind6.3.2升級教程
PhpWind教程教程Rss訂閱Cms教程搜索
PhpWind教程推薦
- PhpWind教程:PHPWind v7.0用戶手冊
- PHPWind7.3.2 安裝教程
- PhpWind教程:上傳附件失敗解決辦法
- PhpWind教程:flash和mp3等播放器只顯示地址的解決方法[7.0]
- PhpWind教程:升級后,首頁空白
- PhpWind教程:phpmyadmin(pma)基本操作教程(添加字段,執(zhí)行SQL,修復(fù)數(shù)據(jù)庫)
- 7.5 單一版與7.5整合版互轉(zhuǎn)教程
- PHPWind 7.0 升級到PHPwind v7.3 圖文教程
- 解除轉(zhuǎn)換后的流量丟失之——全面Rewrite規(guī)則
- PhpWind教程:調(diào)整版塊簡介的字節(jié)限制_for all
- 相關(guān)鏈接:
- 教程說明:
PhpWind教程-PhpWind教程:Windows環(huán)境下PHP5開發(fā)配置指南
。