The yii framework has been installed before, now let’s create the first Yii application
1. Enter the directory of your website
2. Execute the command: YiiRoot/framework/yiic webapp testdrive
Note: The YiiRoot here is the installation directory of your Yii framework.
3. After entering the above command, a prompt message will appear:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/php_pdo_mysql.dll' - /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 Create a Web application under '/home/wwwroot/test.yii.com/'? (yes|no) [no]:
Here it prompts whether to install the web application in this directory. We can directly enter yes to complete. Application creation.
4. Visit your application: http://hostname/index.php. We can see an application that includes a homepage, about page, contact page, and login page.
5. Introduction to the application directory structure:
|-- assets contains public resource files
|-- css contains CSS files
| |-- bg.gif
| |-- form.css
| |-- ie.css
| |-- main.css
| |-- print.css
| `-- screen.css
|-- images Contains image files
|-- index-test.php Entry script file used for functional testing
|-- index.php Web application entrance Script file
|-- protected Contains protected application files
| |-- commands Contains customized 'yiic' commands
| | `-- shell Contains customized 'yiic shell' commands
| |-- components Contains reusable user components| | |-- Controller.php The base class for all controller classes
| | `-- UserIdentity.php The 'Identity' class used for authentication
| |-- config contains configuration files
| | |-- console.php console application configuration
| | |-- main.php Web application configuration
| | `-- test.php functional test Configuration used
| |-- controllers Contains the class file of the controller
| | `-- SiteController.php The class file of the default controller
| |-- data Contains the sample database| | |-- schema.mysql.sql Sample MySQL database
| | |-- schema.sqlite.sql Sample SQLite database
| | `-- testdrive.db Sample SQLite database file
| |-- extensions include third parties Extensions
| |-- messages Contains translated messages
| |-- migrations
| |-- models Class files containing models
| | |-- ContactForm.php 'contact' action form model
| | `-- LoginForm.php 'login' action form model
| |-- runtime contains temporarily generated files
| |-- tests contains test scripts
| | |-- WebTestCase.php
| | |-- bootstrap.php
| | |-- fixtures
| | |-- functional
| | | | `-- SiteTest.php
| | |-- phpunit.xml
| | |-- report
| | `-- unit
| |-- views View and layout files containing controllers
| | |-- layouts contains the layout view file
| | | | |-- column1.php uses the layout used for the single-column page
| | | -- main.php Default layout for all views
| | `-- site View file containing the 'site' controller
| | | -- contact.php 'contact' action view
| | |-- error.php 'error' action view (display external errors)
| | | |-- index.php 'index' action view
| | |-- login.php 'login' action view View
| | `-- pages contains "static" pages
| | `-- about.php "about" page's view
| |-- yiic yiic command line script
| |- - yiic.bat yiic command line script under Windows
| `-- yiic.php yiic command line PHP script
`-- themes Contains application themes
`-- classic
`-- views
For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version
Visual web development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software