如何使用 Yii Framework 使用 yiic 命令创建 webapp

编程入门 行业动态 更新时间:2024-10-11 13:30:36
本文介绍了如何使用 Yii Framework 使用 yiic 命令创建 webapp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-23 18:56:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1047448.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   命令   Yii   Framework   yiic

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!