Home > Backend Development > PHP Tutorial > A simple way to copy files in php, _PHP tutorial

A simple way to copy files in php, _PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-12 08:52:41
Original
842 people have browsed it

How to simply copy files in php,

The example in this article describes how to simply copy files in php. Share it with everyone for your reference, the details are as follows:

<&#63;php
/**
*author:果冻
*qq:52091199
*wyg517.blog.163.com
**/
$file = 'image/a1.jpg';
$newfile = 'a/123.jpg'; //必须有写入权限
  if (file_exists($file) == false)
  {
   die ('文件不在,无法复制');
  }
  $result = copy($file, $newfile);
  if ($result == false)
  {
   echo '复制成功';
  }
&#63;>

Copy after login

Readers who are interested in more PHP related content can check out the special topics of this site: "Summary of PHP File Operations", "Summary of PHP Operations and Operator Usage", "Summary of PHP Network Programming Skills", "Introduction Tutorial on PHP Basic Grammar" ", "Summary of PHP office document operation skills (including word, excel, access, ppt)", "Summary of PHP date and time usage", "Introduction to PHP object-oriented programming tutorial", "Summary of PHP string (string) usage" , "Introduction Tutorial on PHP MySQL Database Operation" and "Summary of Common PHP Database Operation Skills"

I hope this article will be helpful to everyone in PHP programming.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1125901.htmlTechArticleHow to simply copy files in PHP. This article describes how to simply copy files in PHP. Share it with everyone for your reference, the details are as follows: php/***author:jelly*qq:52091199*wyg517.blo...
Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template