can't upload

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

can't upload

Post by Nay »

for some reason or another, i can't upload my files.........anymore.

it's on the same webserver i used a while ago. the code is:

Code: Select all

$directory = "/home/virtual/site95/fst/var/www/html/gallery/images/" . $_FILE['upload_file']['name'];
copy($_FILE['upload_file']['name'], $directory);
anyhow, i keep on getting:

Warning: Unable to access in /home/virtual/site95/fst/var/www/html/panel/gallery.php on line 24

the folders are correctly CHMOD-ed. i have no idea what the error is...

thanks,

-Nay

ps: just wondered if this might effect it:

my domain name has not yet settled to the nameservers so i have to use it through: http://207.44.150.103/~admin95/panel/gallery.php rather than http://www.chaosdreamers.com/panel/gallery.php
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

what about trying move_uploaded_file instead of copy

Mark
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

and should this line

Code: Select all

copy($_FILE['upload_file']['name'], $directory);
be

Code: Select all

copy($_FILES['userfile']['tmp_name'],$directory);
Mark
Post Reply