Do you have a question? Post it now! No Registration Necessary. Now with pictures!
July 22, 2005, 7:12 pm
rate this thread
They are not correct when using them as DB.connection vars.
I was using my own routine, that read in string values from a config
file, that had entries like host=localhost etc, etc.
After reading, I used explode with "=" as a separator,... then finally
created some dynamic vars $$key=$val
They are valid, it seems and printout/echo correct normal values:
They look the same as quoted strings, but when used as database
connection parameters, fail to create a connection.
$link = new mysqli( $host, $user, $pass, $db ); // fails
$link = new mysqli( "localhost", "myUser", "myPass", "myDB" ); // works
and creates a connection
Anyone know why ? Maybe I'm missing something simple.
I'm also exploring good alternatives for config file read-in. THX
- » what might destroy an object that is a member of another object
- — Previous thread in » PHP Scripting Forum