FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Converting Perl to PHP, testing CLI with $_POST (newbie)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Converting Perl to PHP, testing CLI with $_POST (newbie) [message #172079 is a reply to message #172078] Sun, 30 January 2011 10:00 Go to previous messageGo to previous message
Felix Saphir is currently offline  Felix Saphir
Messages: 8
Registered: December 2010
Karma:
Junior Member
P E Schoen <paul(at)pstech-inc(dot)com> wrote:

> This is what I had:
>
> $dbfile = 'C:/xampp/cgi-bin/SCGBG_Data.db';
> class MyDB extends SQLite3
> {
> function __construct()
> {

$dbfile is unknown to this function, it's not in scope. You could
declare it as global here, but your best choice is to pass the
filename as parameter to __construct(): Change the declaration to

public function __construct($filename)
{

> $this->open($dbfile); //This is line 184

$this->open($filename);

> }
> }
>
> $db = new MyDB();

$db = new MyDB($dbfile);

BTW it's all in the manual ...

Felix
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: passing variable to a nested array
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 14:56:26 GMT 2024

Total time taken to generate the page: 0.04871 seconds