PHP deletes Lan files & nbsp; Public & nbsp; function & nbsp; actionRemove ($ Path) & nbsp ;{& nbsp; & nbsp; & nbsp; $ filePath & nbsp; = & n PHP deletes Lan files
Public function actionRemove ($ Path ){
$ FilePath = explode (",", $ Path); // split the string
Try {
Foreach ($ filePath as $ path) {// Loop
$ Path = $ this-> encode ($ path); // transcode
// Exit ($ path) // If you open it here, the result \ 10.80.37.20 \ ECampus \ shared_files \ question .txt
If (strpos ($ path, ".") {// checks whether the file contains a. file, returns true
If (file_exists ($ path) {// The problem is always returned here, false .???????????
If (unlink ($ path) {// cannot be deleted
......
} Else {
}
} Else {
Exit ("2 ");
}
} Else {
Exit ("2 ");
}
Above path: \ 10.80.37.20 \ ECampus \ shared_files \ question .txt
Use the "run" start key + R to open it directly.
Because this operation is performed on remote files, Chinese characters are required.
Ask someone else to help solve the problem and wait online. PHP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service