uploading
Moderator: General Moderators
- cheatboy00
- Forum Contributor
- Posts: 151
- Joined: Sat Jun 29, 2002 10:36 am
- Location: canada
- Contact:
uploading
I got no idea how to even start to do this so here goes.
I'm creating an online database of files and such, and I want other people to beable to use an upload files form to get the files online.
so you come login, goto contribute, then click a browse button and your c:\ opens up in it and then can select a file to put on the site.
if you understand what I'm trying to say, please help.
I'm creating an online database of files and such, and I want other people to beable to use an upload files form to get the files online.
so you come login, goto contribute, then click a browse button and your c:\ opens up in it and then can select a file to put on the site.
if you understand what I'm trying to say, please help.
-
Super Webmaster
- Forum Newbie
- Posts: 2
- Joined: Thu Jan 02, 2003 4:17 am
- Location: Rotterdam, The Netherlands
- cheatboy00
- Forum Contributor
- Posts: 151
- Joined: Sat Jun 29, 2002 10:36 am
- Location: canada
- Contact:
-
Super Webmaster
- Forum Newbie
- Posts: 2
- Joined: Thu Jan 02, 2003 4:17 am
- Location: Rotterdam, The Netherlands
Try this page: http://www.evilwalrus.com/view/Files+an ... tegory.php
-
laserlight
- Forum Commoner
- Posts: 28
- Joined: Wed Jan 01, 2003 6:41 am
Go to the php manual and look up the copy() function.
http://www.php.net/manual/en/function.copy.php
http://www.php.net/manual/en/function.copy.php
I have tried to use the copy function. Here is the code that I used:
I am getting an error saying
Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/xbox-dimension.co.uk/httpdocs/upload/upload.php on line 8
I also tried to use move_uploaded_file() instead of copy() and I got
Warning: Unable to create '/upload/fan1.jpg': No such file or directory in /usr/local/psa/home/vhosts/xbox-dimension.co.uk/httpdocs/upload/upload2.php on line 30
Warning: Unable to move '/tmp/phpyaEF2i' to '/upload/fan1.jpg' in /usr/local/psa/home/vhosts/xbox-dimension.co.uk/httpdocs/upload/upload2.php on line 30
as an error message.
Can anyone please help me
?>
Code: Select all
<?php
if ($file == "none")
{
print "You must specify a file to upload";
}
else
{
copy($file, "/httpdocs/images");
unlink($file);
}
?>Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/xbox-dimension.co.uk/httpdocs/upload/upload.php on line 8
I also tried to use move_uploaded_file() instead of copy() and I got
Warning: Unable to create '/upload/fan1.jpg': No such file or directory in /usr/local/psa/home/vhosts/xbox-dimension.co.uk/httpdocs/upload/upload2.php on line 30
Warning: Unable to move '/tmp/phpyaEF2i' to '/upload/fan1.jpg' in /usr/local/psa/home/vhosts/xbox-dimension.co.uk/httpdocs/upload/upload2.php on line 30
as an error message.
Can anyone please help me
?>
- cheatboy00
- Forum Contributor
- Posts: 151
- Joined: Sat Jun 29, 2002 10:36 am
- Location: canada
- Contact:
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact: