Home >Backend Development >PHP Tutorial >PHP 剔除局域网文件

PHP 剔除局域网文件

WBOY
WBOYOriginal
2016-06-13 11:32:55880browse

PHP 删除局域网文件

    Public function actionRemove($Path) {
        $filePath = explode(",", $Path);   //分割字符串
        try {
            foreach ($filePath as $path) {  //循环
                $path = $this->encode($path);  //转码
           //exit($path)//如果这里放开,结果\\10.80.37.20\ECampus\shared_files\问题.txt
                if (strpos($path, ".")) {    //判断文件是否带. 文件,返true           
                  if (file_exists($path)) {  //问题在这里,总是返回false. ???????????
                        if (unlink($path)) {  //无法删除
                                 ......
                            } else {

                                   }
                    } else {
                        exit("2");
                    }
                } else {
                   exit("2");
                }
以上路径:\\10.80.37.20\ECampus\shared_files\问题.txt
用“运行” 开始键+R  可以直接打开。 
因为这是对远程文件的操作,所以需要有中文。
求高人帮忙解决,在线等。

PHP
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:标头不能下发Next article:怎么利用ajax实现赞