ok i got this script
[AS]<!doctype html public “-//W3C//DTD HTML 4.0 //EN”>
<html>
<head>
<title>Title here!</title>
</head>
<body>
<form action=“upload.php” method=“post” enctype=“multipart/form-data”>
<input type=“hidden” name=“MAX_FILE_SIZE” value=“1000000”>
Select a file to upload! <input type=“file” name=“userfile”><br>
<input type=“submit” value=“Upload!”>
</form>
</body>
</html>[/AS]
and this is the .php file
<?php
if(!(copy($_FILES['userfile']['tmp_name'], "Upload/" . $_FILES['userfile']['name']))) die("Cannot upload files.");
echo "Upload Complete!";
?>
the HTML is called upload.htm and the php file is upload.php
i have a folder that the files go to called Upload
but i get this error
Warning: Unable to create ‘Upload/EXAMPLE.gif’: Permission denied in /home/vhosts/gta.to-j.com/upload.php on line 3
Cannot upload files.
is this my host blocking it or what :-\
you have to make sure that you CHMOD the folder that you are uploading the files to…
chck with your server. its different on different servers… usually you need to use an FTP program…
yeah i am using smart ftp (becuase it’s free:) ) and what do i ask
if my folder Upload/ is CHMOD (whatever that is)
ask how to CHMOD the value of the folder to 777
ok i will let you no what they said but it is a **** free service, i use it to pratice on
ok, if they dont’ offer any help, then there is probably a feature in smartFTP that will allow you to CHMOD the folder’s permissions, but I have never used it… so I’m not sure…
ok i found it in Smart FTP but what do i type
right click Upload folder
commands > misc > CHMOD
the this comes up
SITE CHMOD %a[Mode] %a[File Name]
with a box under it saying parameter
system
May 26, 2003, 8:24pm
10
can you take a screen shot?
system
May 26, 2003, 8:32pm
11
sorry about the piss poor shot but it’s not a work of art:P
Yahoo Small Business Offers Cheap Domain Names, Web Hosting, Easy Website Builder, Business Email, Local Listings, and Ecommerce Solutions for Your Small Business.
also here the site i got it from if that helps
http://robouk.mchost.com/tuts/tutorial.php?tutorial=fileupload