php - Copy file without creating target file -


i want copy file 1 place without knowing target file exists or not.

i'm using:

<?php     $source = 'user/temp/details.txt'; //this file exists.     $target = 'user/'.$user_name.'/details.txt'; //this file don't exists.     copy($source, $target); ?> 

but saying:

  warning: copy() [function.copy]: filename cannot empty in c:\apache2.2\htdocs\account.php on line 3 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -