问题描述
限时送ChatGPT账号..我正在尝试在 Yii 中构建我的第一个应用程序,其网站上的指南位于以下地址:http://www.yiiframework/doc/guide/1.1/he/quickstart.first-app # add-comment问题是通过 YIIC 安装应用程序框架的任何问题都不会出现.我做了以下事情:1. 我浏览了作为我的 WAMP 服务器的框架的 CMD 库.2.我写了如下命令:yiic.php webapp www/blog,我也试过如下命令:yiic webapp www/blog.
I'm trying to build my first app in Yii, the guide on their website at the following address: http://www.yiiframework/doc/guide/1.1/he/quickstart.first-app # add-comment The problem is that any issue installing the application framework through the YIIC can not have that. I did the following: 1. I went through the CMD Library of the framework that is my WAMP server. 2. I wrote the following command: yiic.php webapp www/blog, I also tried the following command: yiic webapp www/blog.
据我了解他们的指南,是否应该有一个名为 blog 的目录,其中包含一个框架应用程序.实际发生的是windows打开了一个标题为打开方式"的窗口,要求我选择要打开yiic.php的程序来查看文件内容.
As I understand their guide, should there be a directory called blog with a skeleton application. What actually happens is that windows opens me the window titled "Open With" asking me to choose which program I want to open the yiic.php to view the contents of the file.
推荐答案
在 Windows 上,您只需转到框架文件夹并键入:
On windows you just go to your framework folder and type:
yiic webapp pathToYourNewProject
yiic 将默认为 yiic.bat,因此您无需指定任何 php.exe(我不是说它不会那样工作).并且新项目的路径可以是相对的或绝对的,以下是一些示例:
yiic will default to yiic.bat so you don't need to specify any php.exe (I'm not saying that it wouldn't work like that). and path to your new project can be relative or absolute, here are some examples:
-- C:
|
-- sandbox/
|
--yii/
| |
| --framework/
| |
| --yiic.bat (for Window)
| --yiic.php (for Linux)
--newWebApp/
要在 Windows 上创建,我使用:
To create on Windows i use:
cd c:\sandbox\yii\framework
yiic webapp ../../newWebApp
type yes when prompted and you're done
或
cd c:\sandbox\yii\framework
yiic webapp c:\sandbox\newWebApp
type yes when prompted and you're done
要在 Linux 上创建:
To create on Linux:
cd /media/sf_sandbox/yii/framework/
./yiic webapp ../../newWebApp
这篇关于如何使用 Yii Framework 使用 yiic 命令创建 webapp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论