openbase_dir 和子目录 [英] openbase_dir and subdirectories
问题描述
我将有许多子目录,例如./home/a、/home/a/file、/home/a/txt、/home/b、/home/b/file、/home/b/txt等
i will have numerous subdirectories eg. /home/a, /home/a/file, /home/a/txt, /home/b, /home/b/file, /home/b/txt, etc.
子目录是按需创建的.我需要将所有子目录添加到 open_basedir.
the subdirectories are created on demand. i need to add all subdirectories to open_basedir.
请建议如何让 open_basedir 识别顶级路径的所有子目录?
pls advise how to make open_basedir recognise all subdirectories of a top path?
推荐答案
来自 http://php.net/manual/en/ini.core.php#ini.open-basedir
open_basedir 指定的限制是自 PHP 5.2.16 和 5.3.4 起的目录名称.以前的版本使用它作为前缀.这意味着open_basedir =/dir/incl"还允许访问/dir/include"和/dir/incls"如果它们存在.如果您只想限制对指定目录的访问,请以斜杠结尾.例如:open_basedir =/dir/incl/
The restriction specified with open_basedir is a directory name since PHP 5.2.16 and 5.3.4. Previous versions used it as a prefix. This means that "open_basedir = /dir/incl" also allowed access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: open_basedir = /dir/incl/
/dir/incl/= 只有目录没有子目录
/dir/incl/ = only the directory no subdirectories
dir/incl = 所有子目录
dir/incl = all subdirectories
这篇关于openbase_dir 和子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!