I have two lines of code:
$path = $_GET['path'];
rmdir(realpath($path));
What they do should be pretty obvious. Anyway, each time it is run, the text "Path is not a directory" is displayed in the browser - but checking the filesystem shows that the directory has actually been removed.
I am using WAMP on Windows.
I am guessing its something related to the formatting of the path. Currently, a path looks like C:\\ilmiont_server\\blog.
Any advice appreciated, Ilmiont
尝试在路径中添加最终斜杠..或类似这样的内容:
rmdir( realpath($path) . DIRECTORY_SEPARATOR );
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.