dook0034 2015-06-22 09:38
浏览 74
已采纳

如何在IBM Bluemix上使用php连接MySQl?

I am install service MySQL to my PHP app on Bluemix and the error is on connection establish on this lines:

$con = mysql_connect("192.155.247.248:3307","uqDqUZ2EKoZ5I","pWXeBZbNtdpOv"); 
if (!$con){ 
    echo "Failed to connect to MySQL: " .mysql_error(); 
} 
mysql_select_db("d65a2b7e14b594d18a049ac918a4a8603",$con);
  • 写回答

3条回答 默认 最新

  • duanjiagu0655 2015-06-24 16:34
    关注

    Create a folder

    .bp-config/options.json in the parent folder

    and add

    {
        "PHP_EXTENSIONS": ["mysqli"]
    }
    

    in the options.json folder the sqli connect will work fine now

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置