about moving file to other DIR or folder

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

7 replies · 575 views · started 16 years ago · 1 min read

7 participants
wapmetal Lead · 609 posts #1

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

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 😊

subzero Super moderator Fellow · 3,954 posts #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... _______…

saini Junior · 13 posts #5

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

djlee Developer · 224 posts #6

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

GiLL Senior · 356 posts #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

<?
$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

brand Senior · 391 posts #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

External image (may be gone)

i only work on wapdesire v_2 coding only

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close