I am new user. I try to deploy my website. my domain is pvt.info.nf .
I have a problem on the File Manager. I cannot delete 1 incorrect directory. The directory is automatically created. the error message is :
Error during FTP change directory, at “htdocs/C:\TA\laragon\www\PVTInfo\storage\logs” : Unable to change directory (path: /htdocs/C:\TA\laragon\www\PVTInfo\storage\logs)
I tried to delete it from file manager and use a FTP Client ( FileZilla ), but both failed. the directory has an invalid Windows-based path (C:\...), and the FTP client is unable to access or delete it due to server restrictions.
I already follow the method.
I create a php file in my local machine called deletefile.php. Then I pull and put it on the same folder as the incorrect " htdocs/C:\TA\laragon\www\PVTInfo\storage\logs " directory.
I run the deletefile.php on my browser :
can the infinityfree support team manually delete the incorrect directory from their side ? I already tried to delete and rename it using PHP codes, already tried to delete it using FileZilla FTP application. But nothing worked
This situation is a little bit more difficult than the previous cases. Those cases only involved a single file, this involves a directory with more files in them.
I see you have an updated deletefile.php script that seems like it should do the trick and recursively delete all files.
The only issue I see is the directory:
The directory to delete is just the name of the directory to delete. No htdocs before it, and also no whitespace characters.
If you change that, I don’t see any reason why your current script doesn’t work.
That code doesn’t work. unlink can only delete files, not directories.
The current deletefile.php on your account is a lot more sophisticated. It actually traverses the directories using scandir and recursively deletes all files with unlink and all directories with rmdir.
The logic itself looks excellent. The only flaw I see is the input directory being invalid.