Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 28-11-2008
Member
 
Join Date: May 2008
Posts: 20
PHP copy?

Okay quick question why do not want this code:
Code:
$ file = '/ user.php'; 
$ newfile = '/ users / $ username / index.php'; 
 
if (! Copy ($ file, $ newfile)) ( 
$ feedback [] = 'Error: File creation failed'; 
:)
Work? Error follows:
Code:
Warning: copy (/ user.php) [function.copy]: failed to open stream: No such file or directory in b-landia.net/httpdocs/temp/upload/inc/register.inc.php on line 41
I have tried to run at full http string on the boot file, which works out (but SOMEHOW I do not want to do) how do I do?

Edit: Well just that user.php is in the same map as the script? but it runs over a regg where a folder is created with the name of the variable $ username
Reply With Quote
  #2  
Old 28-11-2008
Member
 
Join Date: May 2008
Posts: 2,008
Re: PHP copy?

You must have 'character instead of' symbol, if you want the variables to parse the To:
Code:
$ newfile = "/ users / $ username / index.php";
Reply With Quote
  #3  
Old 28-11-2008
Member
 
Join Date: May 2008
Posts: 20
Re: PHP copy?

Thanks! for those interested:
Code:
$ file = ". / Inc / user.php"; 
$ newfile = "users / $ username / index.php"; 
 
if (! Copy ($ file, $ newfile)) ( 
$ feedback [] = 'Error: File creation failed'; 
)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "PHP copy?"
Thread Thread Starter Forum Replies Last Post
How to get the uncut copy or unrated copy of postal 3 game in the UK @nkit Trivedi Video Games 4 22-12-2011 05:45 PM
How to copy DVD on Mac OS X ApplePowerPC Operating Systems 4 04-02-2010 03:07 AM
Copy Text from One Cell to Another in Microsoft Excel without copy & paste Computer_Freak Tips & Tweaks 0 18-03-2009 10:00 PM
How to copy Copy emoticons from Contacts in MSN Messenger 7 ChrisUlrich Tips & Tweaks 1 18-03-2009 07:11 PM
Copy protected CD need to copy some songs SagarP Windows Software 6 11-09-2008 01:56 PM


All times are GMT +5.5. The time now is 02:25 PM.