出于某种原因,这在我开箱即用的 WAMP 上完美运行,但是当上传到 Web 服务器时,它会丢弃以下错误:
严重性:警告
消息:DOMDocument::load(): I/O warning : failed to load external entity "/mounted-storage/home155/sub004/sc81961-YHHB/* * * * * *.com/dev/ 2012-10-04 03 :15:03 4 2012-10-04 03:25:16 2012-09-17 19:25:11 3 0 1 1 2012-10-04 04:08:18 “
文件名:models/fuel_model.php
行号:74
它指向应用程序根文件夹。
代码:
function get_pos($id)
{
$get = $this->db->query(
"SELECT * FROM holding WHERE id=1"
);
$stream = $get->row_array();
$addr = 'http://api.eveonline.com/corp/StarbaseDetail.xml.aspx?keyID='.$stream['apiid'].
'&vCode='.$stream['apikey'] . '&itemID=' . $id;
$link = new DOMDocument();
$get_cache = $this->db->query(
"SELECT * FROM cache_poses WHERE posid=".$id
);
$cache = $get_cache->row_array();
$posted = strtotime(date("Y-m-d H:i:s"));
if(!empty($cache))
{
$posted = strtotime($cache['cachedon']);
}
$current = strtotime(date("Y-m-d H:i:s"));
$mins = $posted - $current;
$expiry = $mins % 60;
if(empty($cache))
{
$link->load($addr);
$this->db->query("INSERT INTO cache_poses (data, posid) VALUES (" . $this->db->escape($link->saveXML()) . "," . $id .")");
} elseif(!empty($cache) && ($expiry >= 360)) {
$this->db->query("DELETE FROM cache_poses WHERE posid=".$id);
$link->load($addr);
$this->db->query("INSERT INTO cache_poses (data, posid) VALUES (" . $this->db->escape($link->saveXML()) . "," . $id . ")");
} elseif(!empty($cache) && ($expiry < 360)) {
$link->load($cache['data']);
}
$supply = $link->getElementsByTagName('row');
$supplies = array();
foreach ($supply as $fuel) {
$block = $fuel->attributes;
$put = $this->db->query('SELECT name FROM items WHERE typeid='.$block->item(0)->nodeValue);
$lck = $put->row_array();
$supplies[$lck['name']] = $block->item(1)->nodeValue;
}
$info = $this->implode_with_keys($supplies);
return $info;
}