dtsjq28482 2015-05-12 23:42
浏览 105

mysqli_connect()使用mamp

I have MAMP up and running and can run php in my browser, but when i attempt to connect to a MySQL database the connection fails. How do I correct this? I have read that to fix this I need to "enable php_mysqli extension in PHP.ini. It’s disabled by default. look for the following line: extension=php_mysqli".

I attempted this but i have multiple PHP.ini files and the first one i clicked on did not even have the line "extension=php_mysli".

I would like to know how to fix this problem so that i can test websites on my computer and not have to upload to a web server, also once everything is set up properly what are the correct parameters for the mysqli_connect() function?

  • 写回答

2条回答 默认 最新

  • dougui4325 2015-05-13 00:41
    关注

    Just installed MAMP to help you, and there is no php.ini in MAMP folder.

    There is just 1 file php.ini in folder:

    C:\MAMP\conf\php5.6.3\
    

    since php5.6.3 is default version for my MAMP installation.

    for my MAMP installation default user for MySQL is root and password root

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持