php io error,sqlite disk io error!

sqlite disk io error!

写了个验证码的脚本 发短信 同时写道数据库。再命令行中测试都好好地,web运行就报了这个错误;请指点。

bVSD7z?w=468&h=157

bVSD9E?w=436&h=109

bVSD7A?w=337&h=63

$content = rand(100000,999999);

$mobile = "xxxxxxxx";

$sendres = insertdb($mobile,$content);

print_r($sendres);

sock_get($mobile,$content);

function sock_get($mobile,$content)

{

// $gurl = "http://www.xxx.xxx.xxx.xxx.xxx;

// $info = parse_url($gurl);

// $fp = fsockopen($info["host"], 80, $errno, $errstr, 3);

// $head = "GET ".$info['path']."?".$info["query"]." HTTP/1.0\r\n";

// $head .= "Host: ".$info['host']."\r\n";

// $head .= "\r\n";

// $write = fputs($fp, $head);

// while (!feof($fp)){

// $line = fgets($fp);

// echo $line."
";

// }

}

function insertdb($mobile,$code){

$time=time();

class MyDB extends SQLite3

{

function __construct()

{

$this->open('11.db');

}

}

$db = new MyDB();

if(!$db){

echo $db->lastErrorMsg();

} else {

echo "Opened database successfully\n";

}

$sql =<<

INSERT INTO code (telephone,code,time)

VALUES ($mobile, $code, $time);

EOF;

$ret = $db->exec($sql);

if(!$ret){

echo $db->lastErrorMsg();

} else {

return true;

}

$db->close();

}

?>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值