Hello Gurus,
I have an issue, that I am trying to figure out if it is an Apache config
issue or a PHP issue.
I have written a script to upload file to a directory on my RH7.0 Linux
Apache server. directory has been chmod 777.
I have a problem with my php uploads. the content-type is added at the
beginning of uploaded file. this makes file useless on server. here is my
code for my upload page.
<?php
$archive_dir="../test";
if ($upload) {
$filename = basename($userfile_name);
if(!copy($userfile, "$archive_dir/$filename")) die ("$filename not
copied! - Error!");
echo "File $filename Uploaded";
}
?>
<table border="0" width="751">
<tr>
<td>
<form method="post" enctype="multipart/form-data" action="<? echo $PHP_SELF
?>">
Upload file!
<input type="file" name="userfile">
<input type="SUBMIT" name="upload" VALUE="upload">
</form>
</td>
</tr>
</table>
Any thoughts would be appreciated.
Wade Peacock
Webmaster
www.FamilyAlbum.ca
[EMAIL PROTECTED]
ICQ: 97998231