[PHP-DEV] access to variables from other modules From: Uwe Steinmann (steinm <email protected>)
Date: 10/19/98

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 <email protected>
For help: php-dev-help <email protected>