$a =mysql_connect ("127.0.0.1", "root", "123456");
mysql_select_db ("MyWeb", $a);
mysql_query ("Set character set ' UTF8 '");
$sql = "SELECT * from ' Test ' limit 1";
$query =mysql_query ($sql, $a);
$data =mysql_fetch_array ($query);
Var_dump ($data);
echo 111;
?>
Directly with the browser open no problem, why with cmd PHP Open will error?
Reply to discussion (solution)
The CLI and the Web use different php.ini
PHP.ini of CLI mode? PHP MySQL show.
Find the php.ini used under the CLI, then extension=php_mysql.dll the front, remove it, and take it.
To find out what to use under the CLI? php.ini
OK
Phpinfo ();
?>
Save? phpinfo.php
Then, yes.
PHP phpinfo.php
Find loaded_configuration File = ' xxxx ' in the Out
XXXX is the use of PHP.ini road?
I printed it, I didn't find loaded_configuration File, I'm win7.
PHP--ini
Loaded Configuration File = ' xxxx '
?? Just?
Loaded Configuration File = ' xxxx '
?? Just?
I can't find it under the Win7.
PHP--ini
Take a look at the.
PHP--ini
Take a look at the.
Oh the original to use PHP--ini print out, thank you, has been solved, knot paste
PHP--ini
Take a look at the.
Well, that makes sense. I think so, too.