PHP deletes Lan files PHP remote access file operations Lan path
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.
Reply to discussion (solution)
What do you want to do with the local area? ? ING to local magnetic ???, In linux, I ?? Do ????, In windows ???
What do you want to do with the local area? ? ING to local magnetic ???, In linux, I ?? Do ????, In windows ???
I am in windows,
Now I should use @ fopen ($ path, 'r') to determine whether the function exists or not.
File_exists ($ path) // so this function is strange.