Do you have a question? Post it now! No Registration Necessary. Now with pictures!
July 16, 2008, 1:12 am
rate this thread
The following code from the php documentation on mysqli failed to work
$mysqli = new mysqli( "localhost", "user", "password", "database" );
Where localhost, user, password, and database where replaced with the
I left the host parameter as "localhost" because that's what I wanted,
however that did not work.
So I changed it to NULL, which defaults to localhost as per the
documentation, but this still did not work.
After some googling, I found the answer on another forum, which stated
that the host should be a dot ".", but no other explanation was given.
Is there anyone that can shed some light on the situation?
I would really like to know why I can't use "localhost", and why this
I've tried every mysqli option imaginable in the php.ini file.
It seems that host must be a dot.