Home  >  Article  >  Backend Development  >  php的copy没有将文件复制到目标文件,但是也没有报错

php的copy没有将文件复制到目标文件,但是也没有报错

WBOY
WBOYOriginal
2016-06-06 20:37:011154browse

代码如下:

<code>    if(file_exists($excel)){
                            if(is_writeable($excel)){
                                if(is_readable($excel)){
                                        if(!copy($excel,$file.'/'.time().'.xlsx')){
                                            exit('1');
                                        }
                                }else{
                                    exit('3');
                                }
                            }else{
                                exit('4');
                            }
                        }
</code>

回复内容:

代码如下:

<code>    if(file_exists($excel)){
                            if(is_writeable($excel)){
                                if(is_readable($excel)){
                                        if(!copy($excel,$file.'/'.time().'.xlsx')){
                                            exit('1');
                                        }
                                }else{
                                    exit('3');
                                }
                            }else{
                                exit('4');
                            }
                        }
</code>
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