Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
Thank you for your advice me! -My.php--- ?php Class My{ private $word; function __construct($getword){ $this-word=$getword; } public function buff(){ mail([EMAIL PROTECTED],test,test); } } ?

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
Thank you for your advice me! -My.php--- ?php Class My{ private $word; function __construct($getword){ $this-word=$getword; } public function buff(){ mail([EMAIL PROTECTED],test,test); } } ?

Re: [PHP] Avoid object twice

2008-06-04 Thread Thijs Lensselink
Quoting Yui Hiroaki [EMAIL PROTECTED]: Thank you for your advice me! -My.php--- ?php Class My{ private $word; function __construct($getword){ $this-word=$getword; } public function buff(){ mail([EMAIL PROTECTED],test,test);

RE: [PHP] Avoid object twice

2008-06-04 Thread Boyd, Todd M.
Thank you for your advice me! -My.php--- ?php Class My{ private $word; function __construct($getword){ $this-word=$getword; } public function buff(){ mail([EMAIL PROTECTED],test,test); } } ?

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
Thank you for your good advice. I excute c.php I did not get Good from b.php. How can I get Good from b.php. Regards, Yui 2008/6/4 Thijs Lensselink [EMAIL PROTECTED]: Quoting Yui Hiroaki [EMAIL PROTECTED]: Thank you for your advice me! -My.php--- ?php Class My{

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
I knew it . But Hello and Good is different file. I would like to get Good from b.php. Please tell me goo advice. Yui 2008/6/4 Boyd, Todd M. [EMAIL PROTECTED]: Thank you for your advice me! -My.php--- ?php Class My{ private $word; function

RE: [PHP] Avoid object twice

2008-06-04 Thread Boyd, Todd M.
I knew it . But Hello and Good is different file. I would like to get Good from b.php. Please tell me goo advice. Yui 2008/6/4 Boyd, Todd M. [EMAIL PROTECTED]: Thank you for your advice me! -My.php--- ?php Class My{ private $word; function

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
My problem is that I would like to share the parameter. For instance, goolge map key. There are actually two files. example, main.php ?php $googlemapkey=g8ejeUFEUHEU;// example mail([EMAIL PROTECTED],test.test); ? Above is part of code; I will excute main.php program. then

Re: [PHP] Avoid object twice

2008-06-04 Thread Thijs Lensselink
Quoting Yui Hiroaki [EMAIL PROTECTED]: My problem is that I would like to share the parameter. For instance, goolge map key. There are actually two files. example, main.php ?php $googlemapkey=g8ejeUFEUHEU;// example mail([EMAIL PROTECTED],test.test); ? Above is part of

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
NO! That is what I do not want! setting.php need to run mail() function. also setting.php need $googlemapkey. other.php just need $googlemapkey. other .php do not need run mail() function. If I use include, I will get twice email. Please do advice how to share the $googlemapkey. Regards, Yui

RE: [PHP] Avoid object twice

2008-06-04 Thread Ford, Mike
On 04 June 2008 16:03, Yui Hiroaki advised: NO! That is what I do not want! setting.php need to run mail() function. also setting.php need $googlemapkey. other.php just need $googlemapkey. other .php do not need run mail() function. If I use include, I will get twice email. Same

RE: [PHP] Avoid object twice

2008-06-04 Thread Boyd, Todd M.
-Original Message- From: Yui Hiroaki [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 10:03 AM To: Thijs Lensselink Cc: php-general@lists.php.net Subject: Re: [PHP] Avoid object twice NO! That is what I do not want! setting.php need to run mail() function. also

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
- From: Yui Hiroaki [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 10:03 AM To: Thijs Lensselink Cc: php-general@lists.php.net Subject: Re: [PHP] Avoid object twice NO! That is what I do not want! setting.php need to run mail() function. also setting.php need $googlemapkey

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 10:03 AM To: Thijs Lensselink Cc: php-general@lists.php.net Subject: Re: [PHP] Avoid object twice NO! That is what I do not want! setting.php need to run mail() function. also setting.php need $googlemapkey. other.php just need $googlemapkey

Re: [PHP] Avoid object twice

2008-06-04 Thread David Giragosian
On 6/4/08, Yui Hiroaki [EMAIL PROTECTED] wrote: Uhmm! It is sure that function can call from other file. But it is NOT EXECUTE mail() function. How mail function be execute! Please do more advice. You may tire of this mail. Yes. David -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Avoid object twice

2008-06-04 Thread Yui Hiroaki
, 2008 10:03 AM To: Thijs Lensselink Cc: php-general@lists.php.net Subject: Re: [PHP] Avoid object twice NO! That is what I do not want! setting.php need to run mail() function. also setting.php need $googlemapkey. other.php just need $googlemapkey. other .php do not need run mail() function

RE: [PHP] Avoid object twice

2008-06-04 Thread Boyd, Todd M.
-Original Message- From: Yui Hiroaki [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 12:28 PM To: Boyd, Todd M. Cc: php-general@lists.php.net Subject: Re: [PHP] Avoid object twice Thanks you for php developer. If php can not share the parameter each different file

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
HI! I had mistake in code in php. When I excute My.php, it say Hello When I excute b.php, it say Hello Good I would like to execute b.php and show only Good If you know it ,please teach me! Here is code below; -b.php ?php function __autoload($class_name) {

Re: [PHP] Avoid object twice

2008-06-03 Thread James Dempster
I don't see how it's possible for you to get Hello after Good, when the file that cause's Hello is required to do Good /James On Mon, Jun 2, 2008 at 2:00 PM, Yui Hiroaki [EMAIL PROTECTED] wrote: Please take a look at code. a.php $obj=new my(Hello); $obj-buff(); Class

Re: [PHP] Avoid object twice

2008-06-03 Thread James Dempster
I suggest you don't put code other than class structures in class files. Also don't execute My.php just execute b.php which though __autoload includes My.php. -b.php ?php function __autoload($class_name) { include_once $class_name . '.php'; } $obj=new My(Hello);

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
Thank you for a good suggest! Somehow, I have to execute my.php also. This program have to run. 1)My.php 2)b.php My.php show Hello - it is OK, b.php shows Hello Good it is NOT good. I need to get only Good Please give me a suggestion. Regards, Yui 2008/6/3 James Dempster [EMAIL PROTECTED]:

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
Thank you for a good suggest! Somehow, I have to execute my.php also. This program have to run. 1)My.php 2)b.php My.php show Hello - it is OK, b.php shows Hello Good it is NOT good. I need to get only Good Please give me a suggestion. Regards, Yui 2008/6/3 James Dempster [EMAIL PROTECTED]:

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
Please look at my.php my.php load $obj=new My(Hello); $obj-buff(); so, if a.php load, it absolutely got hello in load b.php Regards, Yui 2008/6/3 Thijs Lensselink [EMAIL PROTECTED]: Quoting Yui Hiroaki [EMAIL PROTECTED]: Thank you for a good suggest! Somehow, I have to execute my.php

Re: [PHP] Avoid object twice

2008-06-03 Thread Thijs Lensselink
Quoting Yui Hiroaki [EMAIL PROTECTED]: Thank you for a good suggest! Somehow, I have to execute my.php also. This program have to run. 1)My.php 2)b.php My.php show Hello - it is OK, b.php shows Hello Good it is NOT good. I need to get only Good Please give me a suggestion. Regards, Yui

Re: [PHP] Avoid object twice

2008-06-03 Thread Thijs Lensselink
Quoting Yui Hiroaki [EMAIL PROTECTED]: Please look at my.php my.php load $obj=new My(Hello); $obj-buff(); so, if a.php load, it absolutely got hello in load b.php Regards, Yui 2008/6/3 Thijs Lensselink [EMAIL PROTECTED]: Quoting Yui Hiroaki [EMAIL PROTECTED]: Thank you for a good

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
The code is blelow; -b.php ?php function __autoload($class_name) { include_once $class_name . '.php'; } $objref=new My(Good); $objref-buff(); ? --- --My.php-- ?php $obj=new My(Hello); $obj-buff(); Class My{

Re: [PHP] Avoid object twice

2008-06-03 Thread Stut
On 3 Jun 2008, at 17:12, Yui Hiroaki wrote: The code is blelow; -b.php ?php function __autoload($class_name) { include_once $class_name . '.php'; } $objref=new My(Good); $objref-buff(); ? --- --My.php-- ?php

Re: [PHP] Avoid object twice

2008-06-03 Thread Jim Lucas
Yui Hiroaki wrote: The code is blelow; -b.php ?php function __autoload($class_name) { include_once $class_name . '.php'; } $objref=new My(Good); $objref-buff(); ? --- --My.php-- ?php $obj=new My(Hello);

Re: [PHP] Avoid object twice

2008-06-03 Thread Shawn McKenzie
Stut wrote: On 3 Jun 2008, at 18:35, Yui Hiroaki wrote: Sorry I still have a problem. Let's take a step back. What are you *actually* trying to do. I'm assuming it's not just printing out Hello and Good. What is the real problem you're trying to solve and what are the constraints that are

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
Thank you for everyone who helps me! I got a message what I want. Thank you! Yui 2008/6/4 Jim Lucas [EMAIL PROTECTED]: Yui Hiroaki wrote: The code is blelow; -b.php ?php function __autoload($class_name) { include_once $class_name . '.php'; }

Re: [PHP] Avoid object twice

2008-06-03 Thread Stut
On 3 Jun 2008, at 18:35, Yui Hiroaki wrote: Sorry I still have a problem. Let's take a step back. What are you *actually* trying to do. I'm assuming it's not just printing out Hello and Good. What is the real problem you're trying to solve and what are the constraints that are causing

Re: [PHP] Avoid object twice

2008-06-03 Thread Yui Hiroaki
Sorry I still have a problem. I separete files belows; -My.php--- ?php Class My{ private $word; function __construct($getword){ $this-word=$getword; } public function buff(){ echo $this-word.br /; } } ?

RE: [PHP] Avoid object twice

2008-06-02 Thread Scott McNaught [Synergy 8]
Try removing from a.php the lines: $obj=new my(Hello); $obj-buff(); I think this will achieve what you want. -Original Message- From: Yui Hiroaki [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 11:01 PM To: php-general@lists.php.net Subject: [PHP] Avoid object twice Please take

Re: [PHP] Avoid object twice

2008-06-02 Thread Jim Lucas
Yui Hiroaki wrote: Please take a look at code. a.php $obj=new my(Hello); $obj-buff(); Class my{ private $word; function __construct($getword){ $this-word=$getword; } public function buff(){ echo $this-word.br /; } --

Re: [PHP] Avoid object twice

2008-06-02 Thread Yui Hiroaki
if I delete $obj=new my(Hello); $obj-buff(); I can not show Hello. I would like to see hello one time only. Regards, Yui 2008/6/2 Scott McNaught [Synergy 8] [EMAIL PROTECTED]: Try removing from a.php the lines: $obj=new my(Hello); $obj-buff(); I think this will achieve what you want.