I have studied Yii1 related knowledge before, but I have only half understanding of it, but I understand a little bit of the structure. Now use the evening time to learn how to use Yii2, record it here to avoid forgetting it in the future.
Now I have read part of the authoritative guide of Yii2. Although the Chinese website of Yiiframework is authoritative, some chapters are missing compared with the English version, but I can still have a general understanding and read it carefully when using a certain function. By the way, I read the "Stories I Have to Tell with the Yii Framework" on the MOOC website, and it was also pretty good.
Another important thing is that you need to use Google for FQ. After all, it is a foreign framework and there is relatively little content in Chinese. Most of the answers can be found in Google. You can use XX-Net here. Please read the instructions yourself for specific instructions.
The first step is installation. The Yii2 advanced template is used here, and it is not recommended to use it locally. Now that you have composer, let’s learn new things:
1. Composer code repository, where you can find everything about Yii2, such as in Enter "yiisoft/yii2-app-advanced" in the search box. This is the Yii2 advanced template we are looking for. This code base corresponds to github. You can check the github address in the upper right corner, and then check the instructions on how to install Yii2.
2. Download composer. Of course, due to the wall, composer may not work. You need to use Chinese images here. Some images have stopped updating. As of today (2016/03/27), the composer China full image is available. You should be able to use it according to the instructions.
After the above two components are configured, you should be able to use composer to download Yii2. Problems encountered during installation (under Windows system):
1,
Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks ....
You can check this: https://github.com/yiisoft/yii2/issues/9794, that is, delete "fxp" in the relevant directory folder, and then follow the steps again.
2. When installing under windows, you may need to enter your github account password and token. This is to register a github account, and then go to "Personal Center"->"Settings"->"Personal access tokens" Just generate a token; if you encounter a situation where the 'git' command is not recognized, you need to download the github client and try it. If it doesn't work, you may need to add git to the environment variable
3. After the installation is completed, you may encounter To this:
<span>Invalid Parameter – yii\base\InvalidParamException The </span><span>file</span> or directory to be published does not exist: E:\www\yii2\yii2test1/vendor\bower/jquery/dist
This may be because the version is wrong when entering the following:
composer global require <span>"</span><span>fxp/composer-asset-plugin:~1.1.1</span><span>"</span>
, resulting in an error in the directory location. One way is to re-enter the correct version above, and then
composer self-<span>update composer global update composer update</span>
another The first method is also that the currently required files are under vendorbowerbower-asset, so copying the following jquery file to the previous directory can run normally. But it is best to use the first method. I don’t know if the second method has any side effects.
The installation is basically like this. Although it is very laborious, it is also good to learn new methods. Anyway, if you encounter problems, just go to Baidu or Google. I don’t know the specific usage of composer, so I’ll search for it when I need it. That's it, let's go play ball first, Koko!
The above introduces the relevant learning records of Yii2, installing Yii2 (1), including aspects of the content, I hope it will be helpful to friends who are interested in PHP tutorials.

本文由composer教程栏目给大家介绍关于在Debian11上是怎么一步步安装,以及使用Composer的 ,非常详细哦~希望对需要的朋友有所帮助!

Composer是PHP的依赖管理工具,它允许开发者将第三方库和框架与自己的项目进行集成。它的主要功能包括:1、依赖管理;2、版本控制;3、自动加载;4、扩展开发;5、集成其他工具。它简化了PHP项目的依赖管理过程,确保项目的稳定性和可维护性。通过使用Composer,开发者可以更加高效地管理自己的项目和集成第三方库和框架。

composer修改php路径的方法:1、搜索“composer.bat”并复制到项目文件夹;2、编辑“composer.bat”,将内容修改为“@ECHO OFF php "%~dp0composer.phar" %*”即可。

在PHP开发中,我们经常要处理各种依赖包,这些依赖包可能是其他开发者编写的PHP库文件,也可能是一些第三方工具和框架。为了方便管理这些依赖包,我们可以使用Composer来进行相关的安装和管理工作。Composer是一个开源的PHP依赖管理工具,它可以帮助我们自动化安装、更新和卸载PHP依赖包。通过Composer,我们可以轻松地管理我们应用中的不同依赖,同

随着PHP的日益流行,PHP开发人员面临着许多挑战,其中包括代码管理、可重用性和依赖性管理。这些问题可以使用包管理器来解决,而Composer是PHP最受欢迎的包管理器之一。在本文中,我们将探讨使用Composer和PHP包管理器的最佳实践,从而提高您的PHP开发效率和代码质量。何为Composer?Composer是一款PHP包管理器,它可以轻松管理PHP

composer是PHP的依赖管理工具,可以方便地安装、更新和管理项目所需的第三方库和依赖。本文将介绍composer的安装与使用,并提供详细的代码示例。一、安装Composer要使用composer,首先需要将其安装到本地开发环境中。以下演示了在Windows系统中安装composer的步骤:打开Composer的官方网站(https://getcompo

Composer是一个PHP的依赖管理工具,可以帮助开发者有效地管理项目中的依赖关系。通过Composer,我们可以轻松地引入第三方库、框架以及其他项目所需的各种资源。创建一个Composer项目非常简单,只需按照以下步骤进行操作:首先需要确保在本地已经安装了Composer。可以在终端中运行composer-v命令来确认是否已经安装成功。在项目的根目录中

要保存 Composer 动画,可以使用 Lottie 文件格式,具体步骤为:导出为 JSON 文件;使用 Lottie 工具创建 Lottie 文件;从 Lottie 文件导出为多种格式,包括 JSON、GIF、MP4、SWF、HTML。


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Notepad++7.3.1
Easy-to-use and free code editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
