Re: PHP Sub-Routine

From: Date: Mon, 23 Jun 2003 17:21:38 +0000
Subject: Re: PHP Sub-Routine
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-20511@lists.php.net to get a copy of this message
You cannot call a php file index.html. If they are called with the html extension apache it will think that this is a html file so he don't have to parse the page and it will send the page as is to the explorer which cannot understend php. You should call your page index.php. Also make a index.html which redirect you to the index.php or add the index.php to the autoloading pages in the http.conf. -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 cristic@interakt.ro "Hermann" <hzunter@edu.uni-klu.ac.at> wrote in message news:20030621114643.34485.qmail@pb1.pair.com... Hi! I have a little problem! I wrote follwing code! <?php $type = 'file'; //$type = 'db'; // determine the tracker type if ($type == 'file') { require_once 'docs/php/IPTracker/IPTrackerFile.php'; $tracker = new IPTrackerFile('docs/php/IPTracker/ip.log'); } else { require_once 'IPTrackerDB.php'; require_once '../abstractdb/AbstractFactory.php'; $db = AbstractFactory::getDbLayer('MYSQL', '', 'mysql'); $tracker = new IPTrackerDB($db, 'localhost', 'php', '', ''); } // track the current visitor $tracker->track(); ?> If my file ist called index.php, it runs without problems! If I call the file index.html (should also work) he can't parse the line with $tracker->track(); He interpretes the "->" wrong! Is there a other way to call a sub routine in php (without ->)??? Why are these two commandos in php and html the same with other functions? There is a redunancy-bug!!! Regards, Hermann.

« previous php.windows (#20511) next »