|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-10-04 14:45 UTC] flandrestudio dot cn at gmail dot com
Description:
------------
In the case of deleting the directory without using the php function rmdir (such as using the command line to delete), using realpath again will not return false. The problem was not generated in php7.3.9.
在不使用php函数rmdir删除目录的情况下(如使用命令行删除) 再次使用realpath将不会返回false。在php7.3.9未产生该问题。
Test script:
---------------
<?php
var_dump(phpversion());
$a = 'eee';
$path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $a;
// ------------------
var_dump($path);
// ------------------
mkdir($path);
var_dump(realpath($path));
// ------------------
passthru('rd "' . $path . '"');
var_dump(realpath($path));
Expected result:
----------------
string(5) "7.3.9"
string(24) "E:\phpProject\xlbook\eee"
string(24) "E:\phpProject\xlbook\eee"
bool(false)
Actual result:
--------------
string(6) "7.3.10"
string(24) "E:\phpProject\xlbook\eee"
string(24) "E:\phpProject\xlbook\eee"
string(24) "E:\phpProject\xlbook\eee"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
Add var_dump(PHP_ZTS); to your script, and try again.