this question has answer here:
- getting error using constants 3 answers
when run codes localhost, doing fine, when put on "webhoster" (000webhost, free version). error
parse error: syntax error, unexpected t_const in /home/a5532550/public_html/login/db-const.php on line 7
just shows up. server using php version of 5.2. *, apache version of 2.2.19 (unix) , mysql version of 5.1
db-const codes
<?php const db_host = ------; const db_user = ------; const db_pass = ------; const db_name = ------; ?>
prior php 5.3, constants may defined using define()
function , change log click here
<?php define('db_host', 'xxxx'); ?>
refer docs here
Comments
Post a Comment