about moving file to other DIR or folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    about moving file to other DIR or folder

    can u post sample codes where site.com/pogi.zip can be moved @ site.com/folderwant/pogi.zip via $POST $GET????
    i am trying these

    Code:
    if (!copy("$cid", "../vampire/sipogi_$cid"))
    {
        echo "<b>Couldn't copy file.</b><br/>";
    } else {
    echo "uploaded";
    }


    i used $cid for function $POST so URL will be posted there (!copy("$cid", "../vampire/sipogi_$cid")) and url posted correctly as i add data in DB but it dont works in moving that file


    FOR EXAMPLE. i just wanted to CLICK the link I WANT TO mOVE In the folder i want

    but it tells


    Warning: copy() [function.copy]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/hala:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/hala/public_html/sector/hackloads.php on line 256
    Couldn't copy file.



    can please complete these codes where I WANT TO MOVE A FILE TO ANOTHER FOLDER W/C is already in the first LOCation BY ONLY CLICKING THAT FILE .thanks. cus i want to learn bout that thanks
    Last edited by wapmetal; 02.12.09, 15:07.
    com site: http://vampist.net
    download site: http://wapdloads.net
    fb: http://www.facebook.com/pmplx

    #2
    did you have set 777?
    http://ngeo.ro

    Comment


      #3
      777 on the folder you want it move too
      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
      Visit: WapMasterz Coming Back Soon!
      _______
      SCRIPTS FOR SALE BY SUBZERO
      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
      _______
      Info & Tips
      php.net
      w3schools.com

      Comment


        #4
        yes i already did but it gets error
        com site: http://vampist.net
        download site: http://wapdloads.net
        fb: http://www.facebook.com/pmplx

        Comment


          #5
          i think ftp software is best.. no need of any script

          Comment


            #6
            do you want to copy or move, if you wanna move it then you should be using rename() not copy().

            Comment


              #7
              well you need to turn off open_basedir security as it stop shell access scripts if your using new php version you may check new changes etc

              for external file you can use
              PHP Code:
              <?
              $file="http://site.com/filename.zip ";

              $fname= array_reverse(explode("/",$file));
              if(copy("$file", "demo/$fname[0]")) echo "$file copyed<br>";
              ?>
              if you have ssh access you could use linux cp command even as curl command

              or
              some thing like that
              cp /home/user/public_html/mylog.txt /home/user/public_html/backup/mylog.txt
              left wap stuff

              Comment


                #8
                if you use x3 on ya cpanel all ya have to do is click what files you want to move and then click move files and then put where ya want it to be moved to that is if the files ya moving to are in the same account
                HELP THEM WHO HELPS YOU



                i only work on wapdesire v_2 coding only

                Comment

                Working...
                X