the whole folder got copied successfully but ...iam getting this error can you solve it
PHP Code:
Warning: copy() [function.copy]: The first argument to copy() function cannot be a directory in /home/hsedan/public_html/page.php on line 29
Warning: copy() [function.copy]: The first argument to copy() function cannot be a directory in /home/hsedan/public_html/page.php on line 29
dir c0py successfull
at the end you can 'see dir copy successfull " the script works but i want to avoid the error
here is line 29
PHP Code:
if(copy($dir."/".$files[$i], $newdir."/".$files[$i])) {
if you solve this 200 credits are all yours
and also tell me how do i echo the name of the directory in which a php page resides
for ex: page.php is in the folder"xyz" so i want it to escho the name of the folder xyz
i tried this echo"./$dir"; but it did not work .....any guesses
Edit:
oh man i got it right i had seen this somewhere before so what i did was just added an "@"
now here is line 29 with "@"
PHP Code:
if(@copy($dir."/".$files[$i], $newdir."/".$files[$i])) {
ill give your 200 credits ......man iam really happy right now
can please solve this issue too
tell me how do i echo the name of the directory in which a php page resides
for ex: page.php is in the folder"xyz" so i want it to echo the name of the folder xyz
i tried this echo"./$dir"; but it did not work .....any guesses more 25 credits for this