我在寫一個Magento Admin擴展,它裏面有一些Ajax回調。直到現在,我一直在用控制器中的一個簡單的echo語句迴應通過ajax調用反饋的json。它 「作品」,但我得到了一堆這樣的錯誤在我的日誌文件:從Magento Admin Extension輸出Ajax數據的最佳方法
2010-12-14T15:37:05 + 00:00 DEBUG(7):接頭已經發出:
[0] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Response/Http.php:44 [1] /home/simplifiedsafety/www/store/lib/Zend/Controller/Response/Abstract.php:727 [2] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Response/Http.php:75 [3] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Varien/Front.php:188 [4] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Model/App.php:304 [5] /home/simplifiedsafety/www/store/app/Mage.php:599 [6] /home/simplifiedsafety/www/store/index.php:104
我認爲要避免這種情況,我需要通過某種程序塊將其推出。有人能給我一點這方面的指導嗎?