RE: [PHP] A Class question
| From: | Jack Dempsey | Date: | Wed, 07 May 2003 23:11:18 +0000 |
| Subject: | RE: [PHP] A Class question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146757@lists.php.net to get a copy of this message | ||
hey miguel,
in your constructor for error_class you could make the default value of var
$_path or whatever you're using to be /home/logs. Then, if you pass in
something else, it will overwrite it.
As far as "safely use the $MY_ERROR class, i'm not sure i understand what
you mean...
Jack
> -----Original Message-----
> From: Miguel Angelo [mailto:miguel.angelo.lists@migas.mine.nu]
> Sent: Wednesday, May 07, 2003 11:05 AM
> To: php-general@lists.php.net
> Subject: [PHP] A Class question
>
>
> Hello Everyone,
>
> I have a very basic question, if i'm posting to the wrong place sorry.
>
> I'm learning PHP and Object Oriented Programing, and have
> build a class to
> add error messages into a error log file.
> The thing is can i load the class and after it use it on
> another class ?
> this is not like inherd
>
> My example code:
>
> File * index.php *
>
> <?php>
> include("error_class_php");
> include("mysql_class_php");
>
> echo "Acessing Mysql<br>";
>
> $MY_ERROR = new error_class( "/home/logs" );
> $MY_MYSQL = new mysql_class();
>
> $MY_MYSQL -> do_some_select( "mysqL_user", "mysql_password");
>
> ?>
>
> The thing is can i safely use the $MY_ERROR class ? and how can i keep the
> path "/home/logs" that i passed into the $MY_ERROR class ??? and use it
> always
> when the class is invoqued
>
> THankx and sorry if this is a very basic question, but i'm trying
> to learn 2
> things at the same time PHP (which is great) and Object Oriented logic
>
> Stay Happy !
> Miguel Angelo
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>