note 16968 added to functions.arguments
| From: | wls at wwco dot com | Date: | Tue, 20 Nov 2001 16:29:08 +0000 |
| Subject: | note 16968 added to functions.arguments | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21068@lists.php.net to get a copy of this message | ||
Follow up to resource passing:
It appears that if you have defined the resource in the same file
as the function that uses it, you can get away with the global trick.
Here's the failure case:
include "functions_doing_globals.php"
$conn = openDatabaseConnection();
invoke_function_doing_global_conn();
...that it fails.
Perhaps it's some strange scoping problem with include/require, or
globals trying to resolve before the variable is defined, rather
than at function execution.
--
http://www.php.net/manual/en/functions.arguments.php
http://master.php.net/manage/user-notes.php?action=edit+16968
http://master.php.net/manage/user-notes.php?action=delete+16968
http://master.php.net/manage/user-notes.php?action=reject+16968