Results 1 to 3 of 3

Thread: PHP copy?

  1. #1
    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

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    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";

  3. #3
    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'; 
    )

Similar Threads

  1. Replies: 4
    Last Post: 22-12-2011, 05:45 PM
  2. How to copy DVD on Mac OS X
    By ApplePowerPC in forum Operating Systems
    Replies: 4
    Last Post: 04-02-2010, 03:07 AM
  3. Replies: 0
    Last Post: 18-03-2009, 10:00 PM
  4. How to copy Copy emoticons from Contacts in MSN Messenger 7
    By ChrisUlrich in forum Tips & Tweaks
    Replies: 1
    Last Post: 18-03-2009, 07:11 PM
  5. Copy protected CD need to copy some songs
    By SagarP in forum Windows Software
    Replies: 6
    Last Post: 11-09-2008, 01:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,385,853.34485 seconds with 16 queries