I know how to close mysql connection in php
<?php
$con=mysql_connect("localhost","user","password","dbname");
// ....some PHP code...
mysql_close($con);
?>
But how to close mysql connection in cakephp
Thanks in advance
尝试这个..
$this->ModelName->getDatasource()->disconnect();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.