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

PHP 剔除局域网文件

WBOY
Release: 2016-06-13 12:39:21
Original
846 people have browsed it

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
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template