Re: Attachments
| From: | Jason Wong | Date: | Mon, 22 Apr 2002 08:54:13 +0000 |
| Subject: | Re: Attachments | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93950@lists.php.net to get a copy of this message | ||
On Monday 22 April 2002 02:33, Jason Soza wrote:
> Hmm... Okay, I used this script I found on hotscripts - it copies the
> entire file to the specified directory:
>
> echo "<p><center>Trying to upload to: "
> . $upload_path . $filename . "</center></p>\n";
>
> if ( file_exists($upload_path.$filename) ) {
> echo "<p><font color='red'><center>"
> .
> $message["fileexists"]."</font></center></p>";
>
> } else {
> if( move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'],
> $upload_path.$filename) ) {
> echo "<p><center>" .
> $message["complete"]."</center></p>";
> } else {
> echo "<p><font color='red'><center>"
> .
> $message["incomplete"]."</font></center></p>";
> }
>
> Now why would this work but the e-mail scripts not?
1) Did *you* write both the php & perl scripts? Just checking, if you wrote
both, then you might have made the same mistake in both ;-) If they're by
independent authors then the chances of the same mistake are slightly lower.
2) Just to really confirm that the upload process is not the problem can you
try sending a local existing file using your scripts?
3) In your scripts I can't see where the attachments (ie the files) gets
encoded to base64. Have I missed something?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Who are you?
*/