Re: My first xml try
| From: | Andrew Ballard | Date: | Sat, 10 Nov 2007 17:09:40 +0000 |
| Subject: | Re: My first xml try | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264299@lists.php.net to get a copy of this message | ||
On Nov 10, 2007 12:56 AM, Ronald Wiplinger <tm.ronald@gmail.com> wrote:
> Andrew Ballard wrote:
> Ronald,
>
> On Nov 9, 2007 9:05 PM, Ronald Wiplinger <ronald@elmit.com> wrote:
>
>
> I tried to use echo statements for debugging and found that it seems I
> do not get the information of require().
>
> What do I need to change?
>
>
>
> Thanks for helping me!
>
>
> I'm not sure what error you're getting, but I would guess it can't
> find the required file because mysql-config is spelled wrong in the
>
>
>
> What do you mean it is spelled wrong? What is spelled wrong? The file name
> of
> the information for $dbname, $dbhost, $dbuname is in ../mysql-config
In the code you posted, there was an extra 'y' in 'mysql'. My point
about the constructor was that even if these variables are defined in
your mysql-config file, it is included in the class constructor
function RSS(). (See
http://www.php.net/manual/en/language.oop.constructor.php)
Anything
you declare in that function would fall out of scope as soon as the
function finishes, so they would not be available inside your
getDetail() function or any other function. For more information, this
should help:
http://www.php.net/manual/en/language.variables.scope.php
Andrew