如下是php.ini中的原文说明以及默认配置: ; open_basedir, if set, limits all file operations to the defined directory ; and below. This directive makes most sense if used in a per-directory or ; per-virtualhost web server configuration file. This directive is ; *NOT* affected by whether Safe Mode is turned On or Off. open_basedir = . open_basedir可将用户访问文件的活动范围限制在指定的区域,通常是其家目录的路径,也 可用符号"."来代表当前目录。注意用open_basedir指定的限制实际上是前缀,而不是目录名。 举例来说: 若"open_basedir = /dir/user", 那么目录 "/dir/user" 和 "/dir/user1"都是 可以访问的。所以如果要将访问限制在仅为指定的目录,请用斜线结束路径名。例如设置成: "open_basedir = /dir/user/"