What is the difference between using copy() and move()
function in PHP file uploading?

Answers were Sorted based on User's Feedback



What is the difference between using copy() and move() function in PHP file uploading?..

Answer / hitha

Copy :Makes a copy of a file. Returns TRUE if the copy
succeeded, otherwise FALSE.syntax is
copy(source,destination)


Move : If the file is valid, it was uploaded via PHP's
HTTP POST upload mechanism, it will be moved to the
filename given by destination.Otherwise no action will
occur, and move_uploaded_file() will return FALSE.
syntax is same as copy().

Is This Answer Correct ?    30 Yes 12 No

What is the difference between using copy() and move() function in PHP file uploading?..

Answer / sarah crewe

copying a file means making a duplicate copy of the file,
moving a file means to drag a file from one place to another. it will have the same effect like cut and paste.

Is This Answer Correct ?    9 Yes 2 No

What is the difference between using copy() and move() function in PHP file uploading?..

Answer / vishwanath

copy the particular file source to target
for Example A directory have qw.txt copy to B directory
after the copy the A directory have qw.txt and B directory
have qw.txt
In move the A directoru does'n have qw.txt

Is This Answer Correct ?    19 Yes 22 No

What is the difference between using copy() and move() function in PHP file uploading?..

Answer / jgjhgj

ngjhgjg

Is This Answer Correct ?    1 Yes 5 No

What is the difference between using copy() and move() function in PHP file uploading?..

Answer / ashish zarkar intercom online

One Big difference between copy and move command that is we
can just use move command once but the copy can use more
then one thime

Is This Answer Correct ?    5 Yes 17 No

Post New Answer

More PHP Interview Questions

Can constructor be private in php?

0 Answers  


Is php deprecated?

0 Answers  


Is php object oriented?

0 Answers  


What does a delimiter do in mysql?

0 Answers  


Write a function that takes "depth" as argument and return sum of node's data of that depth. For instance, (0) depth 0 / \ (10) (20) depth 1 / \ (40) (50) depth2 If I pass get_sum_by_depth(2) , it would return 90 (i.e. 40 + 50 )

0 Answers   Amazon,


1.Where are the sessions storing ? 2.What are the contents of a session file ? 3.If the server is loaded with too many session files there is a possibility of server crash. How can we solve this issue? 4. How does php server identify that the particular session belongs to particular user ? For ex: If two users A and B logged from different machine, separate session files (say 1 and 2) will be created in the server. But how the php knows that 1 belongs to A and 2 belongs to B ?

4 Answers   PA Consulting, TCS,


Is empty array php?

0 Answers  


Which function is used to read a file removing the html and php tags in it upwork?

0 Answers  


What is the purpose of using php?

0 Answers  


Which is better php or wordpress?

0 Answers  


Explain about Functions in PHP?

1 Answers  


What is string in php?

0 Answers  


Categories