access to variables from other modules
| From: | Uwe Steinmann | Date: | Mon, 19 Oct 1998 11:31:48 +0000 |
| Subject: | access to variables from other modules | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1908@lists.php.net to get a copy of this message | ||
Hi everybody,
I'm working on a new module whose functions operate on a file.
I wonder how it would be best to open that file.
1. Use php3 fopen and pass the file identifier to each of the new functions
$fp = fopen(...);
new_function($fp, ...);
fclose($fp);
This requires to access the variable le_fp in my module. Is that OK?
Or is it cleaner to
2. Create my own open and close functions for the new module?
$fp = new_module_open(...);
new_function($fp, ...);
new_module_close($fp)
Uwe
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net