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 -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -