我一直在做一个使用 AMFPHP 和 flash 的项目。我只做了php的东西。amf 中的一个从 3 个表中获取结果并将其结果存储在 1 个数组中并返回的函数运行良好,但几天后它就停止了。奇怪的是,如果我单独返回结果,它们会起作用,但最终数组永远不会返回,并且无法在其测试浏览器中看到来自 AMFPHP 调用的任何响应。
在我提到的代码中,每一点都从 DB 中获得了正确的结果,并且已经正确地测试了它的重新调整结果。
另一件事似乎很奇怪,我返回的部分结果很好,但在他开始和结束时,它们不适用于其他正在工作的函数:
(mx.collections::ArrayCollection)#0
filterFunction = (null)
length = 6
list = (mx.collections::ArrayList)#1
length = 6
source = (Array)#2
结果
uid = "8BEDEF32-4BED-E1A4-56A0-F227EDD40026"
sort = (null)
source = (Array)#2
这是功能
function getDefaultValuesForAvatarsLocal($jockey_type=NULL){
$defaultValues = array();
$sql = "SELECT * FROM default_values";
$defaultBLValues = $this->db->query($sql);
$numRows = $this->db->num_rows($defaultBLValues);
if($numRows > 0){
$defaultValues['BLP'] = $defaultBLValues; /* IF RETURN THIS GETS RESULT */
if($jockey_type){
$sql = "SELECT jockey_clothing_categories.type, jockey_clothing_items.* FROM jockey_clothing_items
JOIN jockey_clothing_categories
ON(jockey_clothing_items.category_id = jockey_clothing_categories.id)
WHERE jockey_clothing_items.is_default = 1 AND jockey_clothing_items.jockey_type = ". $jockey_type;
$defaultJockeyClothings = $this->db->query($sql);
$numRows = $this->db->num_rows($defaultJockeyClothings);
}
if($numRows>0){
if($jockey_type){
$defaultValues['DJC'] = $defaultJockeyClothings; /* IF RETURN THIS GETS RESULT */
}
$sql = "SELECT horse_avatar_clothings_categories.type, horse_avatar_clothings_items.* FROM horse_avatar_clothings_items
JOIN horse_avatar_clothings_categories
ON(horse_avatar_clothings_items.category_id = horse_avatar_clothings_categories.id)
WHERE horse_avatar_clothings_items.is_default = 1";
$defaultHorseClothings = $this->db->query($sql);
$numRows = $this->db->num_rows($defaultHorseClothings);
if($numRows>0){
$defaultValues['DHC'] = $defaultHorseClothings; /* IF RETURN THIS GETS RESULT */
#return $defaultValues; /* NOT RETUNING THE FINAL ARRAY FROM THIS POINT EITHER */
}else{
# return false;
}
}else{
# return false;
}
#return 1333;
/* THE CONTROL COMES HERE PROPERLY BUT NOT RETUNING THE BELOW ARRAY BUT IS RETUNING ANY TEST TEXT
LIKE return "I AM HERE"; WILL RETURN THE TEXT PROPERLY
*/
return $defaultValues;
}else{
return false;
}
}
任何帮助将不胜感激