Need help detecting attached files
| From: | Don | Date: | Mon, 06 Jan 2003 19:26:54 +0000 |
| Subject: | Need help detecting attached files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-130429@lists.php.net to get a copy of this message | ||
Hi,
I'm using a mailer class that allows for external file attachments. I was using the test:
if ($HTTP_POST_FILES[$val]['size']) {
Which worked fine. However, I wanted something more generic that works for POST or GET so I wrote
the following code:
$request = 'HTTP_' . getenv('REQUEST_METHOD') . '_VARS';
global $$request;
if ($$request[$val]['size']) {
However, it is always failing the test and therefore not working. Any ideas?
Thanks,
Don
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.435 / Virus Database: 244 - Release Date: 12/30/2002