douaipi3965 2012-05-01 20:14
浏览 22
已采纳

Php Active Record删除连接

Im using PHP Active Record - Does anyone know how you kill a connection? I need to kill it, so I can re-connect and have a fresh connection rather than leave it idle until it expires.

This is how I instantiate it:

    ActiveRecord\Config::initialize(function($cfg) {
        $cfg->set_model_directory(APPLICATION_PATH . 'model');
        $cfg->set_connections(array('development' => DB_TYPE.'://'.DB_USER.':'.DB_PASS.'@'.DB_HOST.'/'.DB_NAME));
    });

I have tried this, yet it is not a method:

ActiveRecord\ConnectionManager::drop_connection();
  • 写回答

1条回答 默认 最新

  • dtdr57046 2012-05-01 20:39
    关注

    It looks like it is working so far when I updated to the latest Github PHP Active Record which has quite a few different files. I was confused as the ZIP on their site is very out of date versus the GitHub.

    The new copy seems to have an auto-restablish, I didn't have to do this manually (yet)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了
  • ¥100 H5网页如何调用微信扫一扫功能?