php - $mysql_ disspearing? -
Hi I am an installer coding, somehow ... ive ran into trouble when it creates the .. global.php file Is $ Mysql_ not visible in the connection file, while everything else does?
I am trying to include it
$ mysql_host = 'localhost'; $ Mysql_user = 'root'; $ Mysql_name = '-----'; $ Mysql_pass = '-----'; It comes out in global.php:
= 'localhost'; = 'Root'; = '-----'; = '-----'; Notice $ mysql_ incorrect?
This is the code in the installer:
$ db_name = trim ($ _ POST ['db_name']); $ Db_user = trim ($ _ POST ['db_user']); $ Db_pass = trim ($ _ POST ['db_pass']); $ Db_host = trim ($ _ POST ['db_host']); $ Handle = fopen ($ setting ['config'] ['folder']. $ Setting ['config'] ['file'], 'w'); $ Input = "& lt ;? Php $ mysql_host = ''. $ Db_host. '' $ Mysql_user = ''. $ Db_user. '' $ Mysql_name = ''. $ Db_name. '' $ Mysql_pass = '". $ Db_pass "';? & Gt;"; FILIT ($ handle, $ input); Fclose ($ handle); Can anyone help?
\ $ Mysql_user = '$ db_user'; \ $ mysql_name = '$ db_name'; $ $ mysql_pass = '$ db_pass';? & Gt; "; In double quoted strings, like $ sign concatenation, if you want to insert a dollar sign in the string, then you have to save it from \ backslash.
Comments
Post a Comment