Reply to Re: Outside variables needed inside class

Your name:

Reply:


Posted by Alexey Kulentsov on 05/17/07 22:09

Justin Voelker wrote:
> I would the new config file to be able to use the same variables as my
> config file. The problem I am encountering is that the new config
....


<?php

class BasicConfig
{
var dbHost='localhost';
var dbUser='Justin';
...
}

?>

<?php

require_once 'basic.config.php';

class ExtendedConfig extends BasicConfig
{
var dbUser='god'; // You need to change dbUser for another server
// dbHost will be available without changes
}

?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация