[eluser]Unknown[/eluser]
Hi all,
I don't know whether it was the problem of PHP or the problem of ci, whatever, it can't close the datebase connection ,no matter using the persistent database connection or not.
1.The config of the database like this
<img src="http://x.ceilwoo.com/ci/p0.png"/>
2.The code to test like this
<img src="http://x.ceilwoo.com/ci/p1.png"/>
Code:
function test()
{
$this->db = load->database('oracle',,TRUE);
if(!empty($this->db))
echo "Connected!"."\n";
else
echo "Closed"."\n";
$this->db->close;
if(!empty($this->db))
echo "Connected!"."\n";
else
echo "Closed"."\n";
$this->db->false;
if(!empty($this->db))
echo "Connected!"."\n";
else
echo "Closed"."\n";
}
3.Beforce running the test, we could check the connecting status by using Toad for Oracle ,"NCWALKER" is the name of my computer.
<img src="http://x.ceilwoo.com/ci/p3.png"/>
4.OK,let 's run it.
<img src="http://x.ceilwoo.com/ci/p4.png"/>
5.Now ,check the status again
<img src="http://x.ceilwoo.com/ci/p5.png"/>
I was damned by the database administrator,because every access to the page using oracle database, would make a new connection, it's awful.