note 20437 added to features.file-upload

From: Date: Wed, 03 Apr 2002 20:00:12 +0000
Subject: note 20437 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-28566@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! -- http://www.php.net/manual/en/features.file-upload.php http://master.php.net/manage/user-notes.php?action=edit+20437 http://master.php.net/manage/user-notes.php?action=delete+20437 http://master.php.net/manage/user-notes.php?action=reject+20437

« previous php.notes (#28566) next »