安装完FECRO后前台就是变成代码

安装报错 · ask005 · 于 1年前 发布 · 746 次阅读

跟教程一步一步做下来,把域名认证后,直接安装fecro版本后,前台就变成代码,把这个关闭后,就正常,后台还正常

没办法上传图片,,直接复制上来

in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/BaseObject.phpat line 163 154155156157158159160161162163164165166167168169170171172 */

public function __set($name, $value)
{
    $setter = 'set' . $name;
    if (method_exists($this, $setter)) {
        $this->$setter($value);
    } elseif (method_exists($this, 'get' . $name)) {
        throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
    } else {
        throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
    }
}

/**
 * Checks if a property is set, i.e. defined and not null.
 *
 * Do not call this method directly as it is a PHP magic method that
 * will be implicitly called when executing `isset($object->property)`.
 *
  1. in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/BaseYii.php at line 558– yii\base\BaseObject::__set()
  2. in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/BaseObject.php at line 107– yii\BaseYii::configure()
  3. yii\base\BaseObject::__construct()
  4. in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/di/Container.php at line 420– ReflectionClass::newInstanceArgs()
  5. in /www/wwwroot/www.XXXXX.com/vendor/yiisoft/yii2/di/Container.php at line 171– yii\di\Container::build()
  6. in /www/wwwroot/www.XXXXX.com/vendor/yiisoft/yii2/BaseYii.php at line 365– yii\di\Container::get()
  7. in /www/wwwroot/www.XXXX.com/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 171– yii\BaseYii::createObject() 165166167168169170171172173174175176177 if (isset($config['method']) && !empty($config['method'])) {

         $method = $config['method'];
         unset($config['method']);
     } else {
         $method = $this->defaultObMethod;
     }
     $ob = Yii::createObject($config);
     $params = $ob->$method();
     if ($parentThis) {
         $params['parentThis'] = $parentThis;
     }
    
     return Yii::$app->view->renderFile($viewFile, $params);
    
  8. in /www/wwwroot/www.XXXXX.com/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 219– fecshop\services\page\Widget::renderContentHtml() 213214215216217218219220221222223224225 throw new InvalidConfigException($config['class'].' must implete fecshop\interfaces\block\BlockCache when you use block cache .');

             }
         }
     }
     // 查看 $config['class'] 是否在YiiRewriteMap重写中存在配置,如果存在,则替换
     !isset($config['class']) || $config['class'] = Yii::mapGetClassName($config['class']);
     $content = $this->renderContentHtml($configKey, $config, $parentThis);
    
     return $content;
    

    }

    /**

    • find theme file by mutil theme ,if not find view file and $throwError=true, it will throw InvalidValueException.
  9. in /www/wwwroot/www.XXXXX.com/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 138– fecshop\services\page\Widget::renderContent() 132133134135136137138139140141142143144 throw new InvalidConfigException('in widget ['.$configKey.'],you enable cache ,you must config widget class .');

    }
    foreach ($diConfig as $k=>$v) {
        $config [$k] = $v;
    }
    
    return $this->renderContent($configKey, $config);
    

    }

    /**

    • @param $configKey | string ,使用配置中的widget,该参数对应相应的数组key
    • @param $config,就是上面actionRender()方法中的参数,格式一样。
    • @param $parentThis | array or '' , 调用层传递的参数数组,可以在view中调用。
  10. in /www/wwwroot/www.XXXXX.com/vendor/fancyecommerce/fecshop/app/appfront/theme/base/front/cms/home/index/product.php at line 31– fecshop\services\page\Widget::diRender() 25262728293031323334353637
                <?php
                    $diConfig = [
                        'price' 		=> $product['price'],
                        'special_price' => $product['special_price'],
                    ];
                    echo Yii::$service->page->widget->DiRender('home/product_price',$diConfig);
                ?>
            </div>
        <?php  endforeach;  ?>
    </div>	
    <?php  endif;  ?>
    

in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/View.php at line 348– require('/www/wwwroot/www.XXXX.com/ven...') in /www/wwwroot/www.XXXXX.com/vendor/yiisoft/yii2/base/View.php at line 257– yii\base\View::renderPhpFile()

in /www/wwwroot/www.XXXXX.com/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 163– yii\base\View::renderFile() 157158159160161162163164165166167168169 $viewFile = $this->getViewFile($view);

if (!isset($config['class']) || empty($config['class'])) {
    if ($parentThis) {
        $params['parentThis'] = $parentThis;
    }

    return Yii::$app->view->renderFile($viewFile, $params);
}
if (isset($config['method']) && !empty($config['method'])) {
    $method = $config['method'];
    unset($config['method']);
} else {
    $method = $this->defaultObMethod;

in /www/wwwroot/www.XXXXX.com/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 219– fecshop\services\page\Widget::renderContentHtml() 213214215216217218219220221222223224225 throw new InvalidConfigException($config['class'].' must implete fecshop\interfaces\block\BlockCache when you use block cache .');

        }
    }
}
// 查看 $config['class'] 是否在YiiRewriteMap重写中存在配置,如果存在,则替换
!isset($config['class']) || $config['class'] = Yii::mapGetClassName($config['class']);
$content = $this->renderContentHtml($configKey, $config, $parentThis);

return $content;

}

/**

  • find theme file by mutil theme ,if not find view file and $throwError=true, it will throw InvalidValueException.

in /www/wwwroot/www.XXXX.com/vendor/fancyecommerce/fecshop/services/page/Widget.php at line 81– fecshop\services\page\Widget::renderContent() 75767778798081828384858687 } else {

        throw new InvalidValueException(" config key: '$configKey', can not find in  ".'Yii::$service->page->widget->widgetConfig'.', you must config it before use it.');
    }
}

return $this->renderContent($configKey, $config, $parentThis);

} /**

  • @param configKey String or Array
  • 如果传递的是一个配置数组,内容格式如下:
  • [
  • class 选填

in /www/wwwroot/www.XXXXX.com/vendor/fancyecommerce/fecshop/app/appfront/theme/base/front/cms/home/index.php at line 18– fecshop\services\page\Widget::render() 12131415161718192021222324
<h4 class="sectionBox_h best_seller"><span><?= Yii::$service->page->translate->__('best seller'); ?></span><em><a href=""><?= Yii::$service->page->translate->__('more'); ?></a></em></h4>
<div class="pro-content">
    <?php
        $parentThis['products'] = $bestSellerProducts;
        $parentThis['name'] = 'best-seller';
        echo Yii::$service->page->widget->render('cms/productlist',$parentThis);
    ?>
</div>

<h4 class="sectionBox_h featured"><span><?= Yii::$service->page->translate->__('featured products'); ?></span><em><a href=""><?= Yii::$service->page->translate->__('more'); ?></a></em></h4>
in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/View.php at line 348– require('/www/wwwroot/www.XXXX.com/ven...')
in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/View.php at line 257– yii\base\View::renderPhpFile()

in /www/wwwroot/www.XXXX.com/vendor/fancyecommerce/fecshop/app/appfront/modules/AppfrontController.php at line 97– yii\base\View::renderFile() 919293949596979899100101102103 * 1.get exist view file from mutil theme by theme protity.

  • 2.get content by yii view compontent function renderFile() , */ public function render($view, $params = []) { $viewFile = Yii::$service->page->theme->getViewFile($view); $content = Yii::$app->view->renderFile($viewFile, $params, $this);

    return $this->renderContent($content); }

/**

  • @param $view|string

in /www/wwwroot/www.XXXX.com/vendor/fancyecommerce/fecshop/app/appfront/modules/Cms/controllers/HomeController.php at line 30– fecshop\app\appfront\modules\AppfrontController::render() 24252627282930313233343536 // 网站信息管理 public function actionIndex() {

$data = $this->getBlock()->getLastData();

return $this->render($this->action->id, $data);

}

public function behaviors() {

if (Yii::$service->store->isAppServerMobile()) {
    $urlPath = '';
fecshop\app\appfront\modules\Cms\controllers\HomeController::actionIndex() in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/InlineAction.php at line 57– call_user_func_array() in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/Controller.php at line 181– yii\base\InlineAction::runWithParams() in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/Module.php at line 534– yii\base\Controller::runAction() in /www/wwwroot/www.XXXXX.com/vendor/yiisoft/yii2/web/Application.php at line 104– yii\base\Module::runAction() in /www/wwwroot/www.XXXX.com/vendor/yiisoft/yii2/base/Application.php at line 392– yii\web\Application::handleRequest() in /www/wwwroot/www.XXXXX.com/appfront/web/index.php at line 66– yii\base\Application::run() 60616263646566 * 使用方法:Yii::$service->cms->article;
  • 上面的例子就是获取cms服务的子服务article。 */ new fecshop\services\Application($config);

$application = new yii\web\Application($config); $application->run(); $_COOKIE = [

'PHPSESSID' => 'kc5i8fu3qv5401efs8a0tn5p08',

];

$_SESSION = [

'__flash' => [],
'currency_current' => 'USD',

]; Yii Framework 2022-05-26, 20:39:55

nginx/1.20.1

Fecmall Framework/2.17.4

共收到 0 条回复 问题提问
没有找到数据。
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics