|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-19 17:56 UTC] silkensedai at online dot fr
[2005-04-19 22:06 UTC] tony2001@php.net
[2005-08-11 16:17 UTC] wez@php.net
[2010-12-20 11:53 UTC] jani@php.net
-Package: Tidy
+Package: Safe Mode/open_basedir
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 16:00:01 2025 UTC |
Description: ------------ is_dir() does not work when the folder is an absolute path. For example is_dir('/mnt') won't work (return false). But it works for relative path. Example: $ php -r 'clearstatcache();var_dump(is_dir("/mnt/"));' bool(false) $ php -r 'clearstatcache();var_dump(is_dir("./Templates"));' bool(true) $ test -d "/mnt/" && echo dir || echo not_dir dir $ test -d "./Templates" && echo dir || echo not_dir dir From phpinfo(): PHP Version 5.0.4 System: Linux louve 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 Configure Command: './configure' '--quiet' '--enable-cli' '--enable-cgi' '--disable-all' '--disable-rpath' '--disable-debug' '--disable-path-info-check' '--disable-magic-quotes' '--disable-posix' '--disable-short-tags' '--enable-ipv6' '--disable-static' '--disable-pcntl' '--without-pear' '--with-apxs2=/usr/bin/apxs2' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--with-bz2' '--with-dbx' '--with-ctype' '--with-openssl' '--with-pcre-regex' '--with-gettext' '--with-mcrypt' '--with-mhash' '--with-iconv' '--with-sqlite' '--with-sqlite-utf8' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir' '--with-xpm-dir' '--with-ttf' '--with-xsl' '--with-tsrm-pthreads' '--with-tidy' '--with-freetype-dir' '--enable-gd-native-ttf' '--enable-safe-mode' '--enable-calendar' '--enable-mbstring' '--enable-spl' '--enable-ftp' '--enable-bcmath' '--enable-sockets' '--enable-dom' '--enable-xml' '--enable-soap' '--enable-libxml' '--enable-session' '--enable-simplexml' '--enable-memory-limit' Server API Apache 2.0 Handler PHP API 20031224 PHP Extension 20041030 Zend Extension 220040412 Reproduce code: --------------- print is_dir('/')?"dir: /":"not_dir: /"; Expected result: ---------------- dir: / Actual result: -------------- not_dir: /