| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: May 2008 Location: England
Posts: 771
![]() ![]() ![]() ![]() ![]() ![]() | __construct() problem - php Hey, Been a year since I did OO php. Last time I used this I remember it working fine.. but.. My index.php PHP Code: PHP Code: ????: NamePros.com http://www.namepros.com/showthread.php?t=622201 However, it works if I add: $connection->__construct(); to the index.php Has something changed regarding this? Or am I being blind and missed something completely? o_O
__________________ pixelhero Web Development Studios UK |
| | |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: May 2008 Location: England
Posts: 771
![]() ![]() ![]() ![]() ![]() ![]() | Host has 5.x.x Think it defaults to php4, so i have used .php5 file ext and same problem occurs.
__________________ pixelhero Web Development Studios UK |
| | |
| | #4 (permalink) |
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | I don't think the server is parsing PHP properly. PHP 5 *will* automatically run __construct. .htaccess Code: AddType application/x-httpd-php .php .php5
Last edited by Eric; 11-10-2009 at 08:28 AM.
|
| | |
| | THREAD STARTER #5 (permalink) |
| NamePros Regular Join Date: May 2008 Location: England
Posts: 771
![]() ![]() ![]() ![]() ![]() ![]() | Still not working. Thanks though. I'll get in touch with my host, see if they will change default php to 5 instead of 4. RE: your edit; I did edit the file ext in all combinations
__________________ pixelhero Web Development Studios UK
Last edited by pixelhero; 11-10-2009 at 08:49 AM.
|
| | |
| | #6 (permalink) |
| NamePros Member Join Date: Nov 2009 Location: Christchurch, New Zealand
Posts: 27
![]() | I'd agree with Eric...BUT: Try Code: $connection = new connection;
__________________ Caleb (Spy) Isaacs: Web Designer, Developer and soon-to-be domainer! Game Sector Network | Mind Tyrant Creative (soon!) | Kiwi Dynamic (For sale) |
| | |
| | #7 (permalink) |
| NamePros Regular Join Date: Jul 2007 Location: UK
Posts: 394
![]() ![]() ![]() ![]() ![]() ![]() ![]() | Use: PHP Code: The extension of the include files shouldn't matter (they don't even have to end with ".php").
__________________ |
| | |
| | THREAD STARTER #8 (permalink) |
| NamePros Regular Join Date: May 2008 Location: England
Posts: 771
![]() ![]() ![]() ![]() ![]() ![]() | The problem has been solved. Eric already spoke to me, i've updated php as my host had an old version installed.
__________________ pixelhero Web Development Studios UK |
| | |