将文件夹从测试文件夹移动到我的public_html实时文件夹后,我收到这些错误

时间:2012-11-28 19:07:44

标签: php database magento

将文件夹从测试文件夹移动到我的public_html实时文件夹后,我收到了这些错误。

  

致命错误:在第67行的/.../Page.php中的非对象上调用成员函数getId()
  致命错误:在第90行的/.../Router.php中的非对象上调用成员函数checkIdentifier()

这就是线条的样子

page.php文件

$page = Mage::getSingleton('cms/page');
    if (!is_null($pageId) && $pageId!==$page->getIdentifier()) {
        $delimeterPosition = strrpos($pageId, '|');
        if ($delimeterPosition) {
            $pageId = substr($pageId, 0, $delimeterPosition);

ROUTER.PHP

$page   = Mage::getModel('cms/page');
$pageId = $page->checkIdentifier($identifier, Mage::app()->getStore()->getId());
if (!$pageId) {
    return false;

2 个答案:

答案 0 :(得分:0)

看起来Mage类所在的w / e文件未正确加载。检查您的实时环境中的php.ini文件中是否正确设置了include_path,并且如果您为它们提供了绝对路径,那么这些文件位于您期望的目录中。

答案 1 :(得分:0)

只是一个想法,但看起来你应该拨打getIdentifier而不是getId? - 或者将getIdentifier重命名为getID

$page = Mage::getSingleton('cms/page');
if (!is_null($pageId) && $pageId!==$page->getId()) {
    $delimeterPosition = strrpos($pageId, '|');
    if ($delimeterPosition) {
        $pageId = substr($pageId, 0, $delimeterPosition); 

如果不知道如何调用它,以及来自getIndentifiergetId的课程,很难说清楚...