月度归档:2011年05月

php中的与当前文件名有关一些常量

__FILE__ ,
getcwd(),
$_SERVER["REQUEST_URI"],
$_SERVER["SCRIPT_NAME"],
$_SERVER["PHP_SELF"],
$_SERVER["SCRIPT_FILENAME"],
来观察一下这些变量或函数的异同.
假设有一个请求地址为:
http://localhost:8080/test.php/age=20
而test.php 的完整路径是: D:/server/www/example/test.php
1) getcwd()
将得到浏览器请求的页面文件所在的目录. 即test.php 文件所在的目录: D:/server/www/example/ ,
如果在test.php 执行了 require 或 include 语句, 比如 inculde(”test_dir/test2.php”),
那么在 test2.php 里 getcwd()函数 返回的也将是 test.php 所在的目录.
2) __FILE__
一个魔术变量, 用它将得到 __FILE__ 变量所在文件的完整路径,
比如: test.php 里 __FILE__ 将得到 D:/server/www/example/test.php ,
test_dir/test2.php 里的 __FILE__ 将得到 D:/server/www/example/test_dir/test2.php
3) $_SERVER["SCRIPT_FILENAME"]
将得到浏览器请求的页面文件的完整路径.
test.php 和 test_dir/test2.php 里用 $_SERVER["SCRIPT_NAME"] 都将得到 D:/server/www/example/test.php.
4) $_SERVER["SCRIPT_NAME"]
将得到浏览器请求的页面文件的文件名,注意: 与 $_SERVER["SCRIPT_NAME"] 不同, 此变量只得到文件名而不包含路径,
在test.php 与 test_dir/test2.php 用$_SERVER["SCRIPT_NAME"] 得到的都将是 test.php.
当然, 在test.php 与 test_dir/test2.php 执行 basename($_SERVER["SCRIPT_FILENAME"]) 与 $_SERVER["SCRIPT_NAME"] 相同.
执行 在test.php 与 test_dir/test2.php 执行 realpath(”test.php”) 得到的结果与 $_SERVER["SCRIPT_FILENAME"] 相同.
5) $_SERVER["PHP_SELF"]
将得到浏览器请求页面的文件名, 并剥掉问号 ? 后的内容, 注意:不包含路径,
比如在客户端里请求
http://localhost:8080/test.php?age=20&name=Tom
,
那么test.php 和 test_dir/test2.php 的 $_SERVER["PHP_SELF"] 都将得到 “test.php”。“age=20&name=Tom”被剥掉。
而如果客户端里请求
http://localhost:8080/test.php/age=20&name=Tom
,
那么test.php 和 test_dir/test2.php 的 $_SERVER["PHP_SELF"] 都将得到 “test.php/age=20&name=Tom”。
6) $_SERVER["REQUEST_URI"]
将得到浏览器请求页面的文件名, 以及文件名之后的所有内容(注意: 井号 # 之后的内容将被略去),
比如在客户端里请求
http://localhost:8080/test.php?age=20&name=Tom
,
那么test.php 和 test_dir/test2.php 的 $_SERVER["REUEST_URI"] 都将得到 “test.php”。“age=20&name=Tom”被剥掉。
而如果客户端里请求
http://localhost:8080/test.php/age=20&name=Tom
,
那么test.php 和 test_dir/test2.php 的 $_SERVER["REQUEST_URI"] 都将得到 “test.php/age=20&name=Tom”。
*/
// test.php:
echo “test1.php variables
”;
echo “getcwd: “, getcwd(), “
”;
echo “__FILE__: “, __FILE__, “
”;
echo “REQUEST_URI: “, $_SERVER["REQUEST_URI"], “
”;
echo “SCRIPT_NAME: “, $_SERVER["SCRIPT_NAME"], “
”;
echo “PHP_SELF: “, $_SERVER["PHP_SELF"], “
”;
echo “SCRIPT_FILENAME “, $_SERVER["SCRIPT_FILENAME"] , “
”;
// 把 test2.php 包含进来, 在 test2.php 里输出上面的变量,看有什么不同:
include_once(”test2/test2.php”);

windows server2003 各版本区别

比较 Windows Server 2003 的版本

使用这组表比较 Windows Server 2003 系列的特性,这组表按功能组织。

特性

图例: Feature included or supported = 支持全部功能 Feature partially supported = 支持部分功能 Feature not included = 不支持该功能

特性 标准版 企业版 数据中心版 Web 版
硬件规格
64位支持1 Feature not included Feature included Feature included Feature not included
热插拔内存2, 3 Feature not included Feature included Feature included Feature not included
非均一内存访问 (NUMA)3 Feature not included Feature included Feature included Feature not included
数据中心计划 Feature not included Feature not included Feature included Feature not included
2 GB最大内存 Feature not included Feature not included Feature not included Feature included
4 GB最大内存 Feature included Feature not included Feature not included Feature not included
32 GB最大内存4 Feature not included Feature included Feature not included Feature not included
64 GB最大内存5 Feature not included Feature partially supported Feature included Feature not included
1 TB最大内存6 Feature not included Feature not included Feature partially supported Feature not included
2-路 SMP Feature included Feature included Feature not included Feature included
4-路 SMP Feature included Feature included Feature not included Feature not included
8-路 SMP Feature not included Feature included Feature included Feature not included
32-路 SMP Feature not included Feature not included Feature included Feature not included
64-路 SMP Feature not included Feature not included Feature included Feature not included
目录服务
Active Directory Feature included Feature included Feature included Feature partially supported
Microsoft Identity Integration Server 2003 (MIIS) Feature not included Feature included Feature included Feature not included
安全服务
Internet 连接防火墙2 Feature included Feature included Feature not included Feature included
公钥结构,证书服务与智能卡 Feature partially supported Feature included Feature included Feature partially supported
终端服务
远程管理桌面 Feature included Feature included Feature included Feature included
终端服务器 Feature included Feature included Feature included Feature not included
终端服务器会话目录 Feature not included Feature included Feature included Feature not included
互操作工具
UNIX 服务 Feature included Feature included Feature included Feature not included
集群技术
网络负载平衡 Feature included Feature included Feature included Feature included
群集服务 Feature not included Feature included Feature included Feature not included
通讯与网络服务
虚拟专用网络 (VPN) 支持 Feature included Feature included Feature included Feature partially supported
Internet身份验证服务 (IAS) Feature included Feature included Feature included Feature not included
网桥 Feature included Feature included Feature included Feature not included
Internet 连接共享 (ICS) Feature included Feature included Feature not included Feature not included
IPv6 Feature included Feature included Feature included Feature included
文件与打印服务
分布式文件系统 (DFS) Feature included Feature included Feature included Feature included
加密文件系统 (EFS) Feature included Feature included Feature included Feature included
卷影副本恢复 Feature included Feature included Feature included Feature included
卷影副本传输 Feature not included Feature included Feature included Feature not included
可移动存储 Feature included Feature included Feature included Feature included
远程存储 Feature not included Feature included Feature included Feature not included
传真服务 Feature included Feature included Feature included Feature not included
Macintosh 服务 Feature included Feature included Feature included Feature not included
UNIX 服务 Feature included Feature included Feature included Feature not included
虚拟磁盘服务 (VDS) Feature included Feature included Feature included Feature included
卷影副本服务 (VSS) Feature included Feature included Feature included Feature included
管理服务
IntelliMirror Feature included Feature included Feature included Feature partially supported
组策略结果 Feature included Feature included Feature included Feature partially supported
Windows 管理规范 (WMI) 命令行 Feature included Feature included Feature included Feature included
远程操作系统安装 Feature included Feature included Feature included Feature included
远程安装服务 (RIS) Feature included Feature included Feature included Feature not included
Windows系统资源管理器 (WSRM) Feature included Feature included Feature included Feature not included
.NET 应用服务
.NET Framework2 Feature included Feature included Feature included Feature included
Internet 信息服务 (IIS) 6.0 Feature included Feature included Feature included Feature included
ASP.NET2 Feature included Feature included Feature included Feature included
企业级 UDDI 服务 Feature included Feature included Feature included Feature not included
多媒体服务
Windows Media™ 服务2 Feature partially supported Feature included Feature included Feature not included

1 仅适用于 64 位版本。
2 不支持 Windows Server 2003 的 64 位版本。
3 可能会受到 OEM 厂商硬件限制。
4 企业版的 32 位版本和标准版的 x64 版本最高可支持 32 GB RAM。
5 数据中心版的 32 位版本支持 64 GB RAM。
6 数据中心版的 64 位版本和企业版的 64 位版本都支持 1 TB RAM。