I cant get files to upload via http details
are below could anyone help me please .
on the /tmp directory the permissions are
drwxrwxr-t
should this not be
drwxrwxr-x
also how do you use the chmod command to make changes on a directory . My main problem is that the service provider keeps telling me there is a problem with my script of which i don't think there is
i am using
html file -upload_form.html
<HEAD>
<TITLE>Upload a File</TITLE>
</HEAD>
<BODY>
<H1>Upload a File</H1>
<FORM ENCTYPE="multipart/form-data" ACTION="do_upload.php3" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
</BODY>
and do_upload.php3
<?php
/ Userland test for uploaded file. /
function is_uploaded_file($filename) {
if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
$tmp_file = dirname(tempnam('', ''));
}
$tmp_file .= '/' . basename($filename);
/ User might have trailing slash in php.ini... /
return (ereg_replace('/+', '/', $tmp_file) == $filename);
}
if (is_uploaded_file($userfile)) {
copy($userfile, '/home/sites/site130/web/download/'.$userfile_name);
} else {
echo "Possible file upload attack: filename '$userfile'.";
}
?>
Am i doing something wrong ?