File upload script not working
Submitted by ehcpuser on Fri, 02/18/2011 - 23:12
I've created a file upload script, and it doesn't seem to be working. Here's my code. I'm wondering if there's something that has to do with ehcp. I asked a couple of php guys and they don't know so it might be php settings. I saw something when I searched, but I still don't understand it. Here's the code.
0) {
die("Error uploading file! Code $error.");
}else{
move_uploaded_file($temp,"/center/resources/books/".$filename);
mysql_query($sql);
}
}
?>
ehcpuser
Fri, 02/18/2011 - 23:17
Permalink
I figured the upper code
I figured the upper code didnt work, so here's an image.
http://img526.imageshack.us/i/screenshot20110218at413.png/
I use EHCP =)
ehcpuser
Mon, 02/21/2011 - 21:41
Permalink
Your solution didn't help. I
Your solution didn't help. I still receive that error.
I use EHCP =)
Stone1555
Sat, 02/19/2011 - 17:37
Permalink
Where is the code running at?
Where is the code running at? ie in a domain folder? where are you trying to upload the file to?
ehcpuser
Sat, 02/19/2011 - 20:51
Permalink
in the image... I'm trying to
in the image... I'm trying to upload it from admin to /center/resources/books where /center is a directory right off of the root directory
I use EHCP =)
Stone1555
Sat, 02/19/2011 - 22:43
Permalink
Ok let me try to explain that
Ok let me try to explain that better.
this code u have in the pic is in a file called lets say, upload.php. Where is that file located? is it in a domain--
test.com/upload.php =
var/www/vhosts/test/test.com/httpdocs/upload.php?
and the dir your copying to, wheres its path?
var/www/vhosts/test/test.com/httpdocs/center/resources/books
thats just an example of what im looking for. If your trying to put the file somewhere on the server not in a web dir, esp under the same domain as that the script is in, you will have issues.
ehcpuser
Sat, 02/19/2011 - 22:49
Permalink
its located in
its located in /center/admin/addresource.php
I use EHCP =)