Using JFactory in an 'include' - Joomla! Forum - community, help and support


hello. i've 2 files - application.php , include.php (just dummy names). both these part of structured mvc component. i'm using

code: select all

$db =& jfactory::getdbo();
in include.php set database table field value variable. i'm including include.php in application.php, variable used in application.php. however, not working. because i've tried using mysql_connect (with direct database name, password) in include.php , working fine, suspect reason, jfactory in include.php not being parsed while getting included in application.php.

my question - there way working without using mysql_connect ?
- if choose use mysql_connect, secure enough if afterwards write-protect directory or access-protect file using htaccess ? not directly related joomla, wanted know considering joomla environment.

thanks..






Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい