PHP: mysql_connect() won't work via command line

后端 未结 7 1827
情书的邮戳
情书的邮戳 2021-01-17 15:37

I have a script which calls mysql_connect() to connect to a MySQL DB. When I run the script in a browser, it works. However, when I run it from a command line

7条回答
  •  执笔经年
    2021-01-17 15:41

    Please make sure this line appears in php.ini

    extension=php_mysql.dll

    Please note that the php.ini used in command line may be different from the php.ini used by apache.

提交回复
热议问题