Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    New Zealand
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't Find File to Copy

    I am new to the copy() command and need a hand.

    I have a line of code like this:

    <? copy('../movies/movieTemplate.php','../movies/$filename'); ?>

    I get an error back like:

    Unable to open '../movies/movieTemplate.php' for reading: No such file or directory


    I thought that perhpas php (or atleast the copy command) does not recognise the ../ to move it back a directory, if so what do I use
    eTheory - the theory of revolution

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    North East England
    Posts
    853
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use the full server path or the full url.
    [+] Computer/PC issues [+] Silverpaw3D
    ------------------------------------------------
    Never buy a dwarf with learning disabilities...

    ...it's not big, and it's not clever.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    also note that variables within single quotes are not converted to their value

    ,'../movies/$filename');

    would need to be similar to

    ,'var/site/public/movies/'.$filename);
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    New Zealand
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah, thanks to both of you, sorted now
    eTheory - the theory of revolution


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •