简体   繁体   English

YII框架发行问题

[英]YII Framework Publishing Issue

I have developed one website in YII framework. 我在YII框架中开发了一个网站。 I have uploaded my all the files via FTP, and I also have added database. 我已经通过FTP上传了所有文件,并且还添加了数据库。 (I have Windows based hosting - Plesk Cpenal) (我有基于Windows的托管服务-Plesk Cpenal)

I am not able to run my website, After some re-search, I came to know that, I need to Publish the website first and then I need to run it. 我无法运行我的网站,经过一番重新搜索后,我知道,我需要先发布网站,然后再运行它。 It shows the following error: http://ss.aemonindia.com/admin/backend/web/ 它显示以下错误: http : //ss.aemonindia.com/admin/backend/web/

So is this the right suggestion? 那么这是正确的建议吗? Or any other issue would be there. 否则会有其他问题。 And if yes, Then how to publish this website? 如果是,那么如何发布该网站?

Here is my index.php code : 这是我的index.php代码:

 <?php defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); require(__DIR__ . '/../../vendor/autoload.php'); require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); require(__DIR__ . '/../../common/config/bootstrap.php'); require(__DIR__ . '/../config/bootstrap.php'); $config = yii\\helpers\\ArrayHelper::merge( require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); (new yii\\web\\Application($config))->run(); 

In Yii2 before use site you must usually "init" it (by running yii init or php yii init depends on your environment). 在使用Yii2的站点之前,您通常必须“初始化”它(通过运行yii initphp yii init取决于您的环境)。

But right now you have error in "index.php" file syntax on line 10. Fix it or show the file content here to help you. 但是现在,您在第10行的“ index.php”文件语法中有错误。修复它或在此处显示文件内容可以为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM