PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, January 12, 2022

[FIXED] how to create webapp with yiic command using Yii Framework

 January 12, 2022     yii     No comments   

Issue

I'm trying to build my first app in Yii, the guide on their website at the following address: http://www.yiiframework.com/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.

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.


Solution

On windows you just go to your framework folder and type:

yiic webapp pathToYourNewProject

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/

To create on Windows i use:

cd c:\sandbox\yii\framework
yiic webapp ../../newWebApp
type yes when prompted and you're done

or

cd c:\sandbox\yii\framework
yiic webapp c:\sandbox\newWebApp
type yes when prompted and you're done

To create on Linux:

cd /media/sf_sandbox/yii/framework/
./yiic webapp ../../newWebApp


Answered By - Marian Zburlea
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing