2
我在某些服務器上使用了一些星號的PHPAGI。但是,當我在新服務器中使用它們時,它們像平常一樣工作了3天,現在它們的耗時比預期的要長。這是一個示例。
任何建議表示讚賞。比平時更長的phpagi運行時間
#!/usr/bin/php -q
<?php
require('phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$_callerId = $agi->get_variable("CALLERID(num)");
if(strlen($_callerId)>4)
{
$con=mysqli_connect(SomeServer);
$result = mysqli_query($con,"Select caller_id,extention from record_call order by id desc limit 50");
while($row = mysqli_fetch_array($result)) {
$tempCallerId = $row['caller_id'] ;
$tempExtention = $row['extention'] ;
if($tempCallerId==$_callerId)
{
$agi->set_variable('exExtention',$tempExtention);
mysqli_close($con);
return;
}
};
$agi->set_variable('exExtention','new');
mysqli_close($con);
?>