ID: 12790
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Class/Object related
Operating System: solaris7
PHP Version: 4.0.6
New Comment:

Works for me just fine with PHP 4.1.0RC1.


Previous Comments:
------------------------------------------------------------------------

[2001-08-16 08:35:29] [EMAIL PROTECTED]

Using PHP4.06 on solaris 7 and SiteManager (www.roadsend.com) as framework.

I can't access global vars in a class method when it is defined  in an external file.
Am I doing something wrong, or is this a "new feature" ?
(Think it was working in old PHP versions)

here is the code :
I've defined an array variable in a file (mime.php)
<?php  //mime.php
$mime_types =
array(
      TYPETEXT => 'text', 'text' => TYPETEXT,
      TYPEMULTIPART => 'multipart', 'multipart' => TYPEMULTIPART,
      TYPEMESSAGE => 'message', 'message' => TYPEMESSAGE
      );
?>

And the business part
<?php
require_once("mime.php");
class wmMessageHeaderParts extends SM_module {
[ ... ]

  function moduleThink() {
      global $mime_types, $SM_siteManager;
        if(isset($mime_types)) echo("-- OK --");
  } //end module think
}
?>
$mime_types doesn't seem to be set.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=12790&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to