note 20437 rejected from features.file-upload by torben
| From: | torben@php.net | Date: | Wed, 03 Apr 2002 22:42:56 +0000 |
| Subject: | note 20437 rejected from features.file-upload by torben | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-28579@lists.php.net to get a copy of this message | ||
OH LORDY - READ THIS if you are separating your php script into separate files for organizational
and/or size purposes. If you are using require() or include() and using file upload functionality
within a function make sure you declare $HTTP_POST_FILES as a global within your function:
<?php
function finally_functional_function()
{
global $HTTP_POST_FILES;
yaddi yaddi yadii
return 0;
}
?>
because it just doesnt work without it regardless of what the documentation says about the variabvle
always being global. This should save you 28 years+ of life. I know that when i started this it
was 28 years ago,..and now finally I have solved the problem - dont be another victim!