文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | 免费看大片 | WPS | 杀毒软件
清风网络
首 页 软件下载 网络学院 数码学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络学院网络编程PHPWindows XP下PHP+MySQL环境搭建
精品推荐
特别推荐
·菜鸟学PHP之Smarty入门
·PHP环境安全配置教程
·PHP入门指导:如何学习PHP?
·Php+Mysql注入专题
·PHP:实现给上传图片加水印的程序代码
·PHP动态网站开发中常用的8个小技巧
·PHP初学者:配置Apache服务器并且设置DNS
·初学PHP指导:php.ini 配置详细选项
·好文分享:PHP入门的学习方法
·急速搭建属于自己的Discuz!6论坛
热点TOP10
·菜鸟学PHP之Smarty入门
·傲慢与偏见 程序员想让HR知道的七件事
·升级PHP5的理由:PHP4和PHP5性能对比
·PHP4将结束更新并在明年退出历史的舞台
·jdk1.6环境搭建netbeans的中文乱码
·关于Html嵌入打成jar包的Applet方法
·学习java的一些好的书籍介绍
·WEB开发中Spring AOP实际应用一例
·Java Server Faces建立交互式WEB站点
·利用Java Servlets 2.4实现过滤

Windows XP下PHP+MySQL环境搭建

日期:2007年12月20日 作者: 查看:[大字体 中字体 小字体]


# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"

对于 /cgi-bin/来说,此条目告诉 Apache 如何处理任何包含 cgi-bin 目录的 URL。例如,如果您请求了 http://www.newInstance.com/cgi-bin/mail-me,Apache 不会在 cgi-bin 目录中查找一个名为 mail-me 的文件。相反,ScriptAlias 命令会告诉 Apache 查看另一个目录 —— 在本例中,这个目录是 C:/Program Files/Apache Group/Apache2/cgi-bin/。这是至关重要的,因为您不会希望将脚本存储在可通过 Web 访问的目录中。因此,您需要为 PHP 脚本添加一个条目。如下所示:

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
ScriptAlias /php/ "C:/PHP/"

您可能认为 C:/PHP 不是存储 Web 站点脚本的好地方。这绝对是正确的;然而,您将告诉 Apache 通过 PHP 解释器处理所有以 .php 结尾的文件,而无需考虑这些文件的位置;换句话说,无需担心这个问题。

接下来,您需要告诉 Apache 以 .php 结尾的文件必须作为应用程序处理;尤其是,您希望为 PHP 文件分配一个类型,然后您就能够指示 Apache 以特定方式处理它们。在 ScriptAlias 条目下,添加以下条目:

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
ScriptAlias /php/ "C:/PHP/"
AddType application/x-httpd-php .php

现在您只需告诉 Apache 当它碰到这种新类型(链接到以 .php结尾的文件)时应该进行什么操作即可。基本上,这仅涉及告诉 Apache 运行什么程序,以及将 PHP 脚本交给什么程序;当然,这个神奇的程序就是您刚刚安装的 PHP 解释器。将此指令直接添加到刚才添加的两个指令下方:

#
# ScriptAlias: This controls which directories contain server scripts.

上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] 下一页 




上一篇:动态加载外部css或js文件

下一篇:简易边框制作Photoshop教程

相关文章:
·Windows Vista震撼1600X1200高清壁纸
·Windows系统漏洞修复软件大比拼
·鲜为人知的Windows XP优化
·如何让Windows桌面图标任我排
·注册表已经损坏并导致WindowsXP无法启动,应该如何恢复
·Windows XP的20个超级实用技巧大全
·Windows Vista Ultimate中文旗舰版下载+简单破解(支持迅雷HTTP & BT)
·Windows Vista 快捷方式箭头去除器 1.3
·Windows系统进程列表完全解析
·制作Windows系列可启动安装光盘(1)
相关软件:
·Windows主题70合一典藏版
·如何加固Windows XP 主机安全
·Windows环境下32位汇编语言程序设计
·全能助手Windows优化王 2006 V3.95
·黑色苹果Windows主题Kuro
·Windows Xp sp2 补丁集(至2007.11.13)
·Windows Live Messenger(MSN)V8.5.1235 简体中文版
·Windows 2003 Server 简体中文企业版(免激活)ISO
·番茄花园 Windows XP Pro SP2 免激活 ISO
·Windows优化大师V7.72 Build 7.429 正式版

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.viphot.com
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.viphot.com All Rights Reserved. 鄂ICP备05000083号Powered by:viphot