Home > Backend Development > PHP Tutorial > Symfony installation and configuration method, symfony configuration method_PHP tutorial

Symfony installation and configuration method, symfony configuration method_PHP tutorial

WBOY
Release: 2016-07-12 08:56:47
Original
721 people have browsed it

Symfony installation and configuration method, symfony configuration method

The examples in this article describe the installation and configuration method of Symfony. Share it with everyone for your reference, the details are as follows:

Installing Symfony manually is very simple and there is hardly much to say. Open http://symfony.com/download, select a Symfony release version from the selection list on the page, and then click "DOWNLOAD NOW" next to it to unzip the downloaded file package to a location on your Web server , the installation is complete. (Choosing the one with the highest version number is usually the best. Whether in tgz format or zip format is just a matter of personal preference. Each version of Symfony also has a "without vendor" version, but it is best not to download this version at the beginning.)

Install Symfony using Composer

Symfony has a good partner called Composer. Let’s see how to use Composer to install Symfony.

Get Composer

As mentioned before, Composer is a PHAR, an executable PHP code package (Php ARchive), which is a cool thing. If you are interested, there is more about Composer at https://getcomposer.org/ for more information.

On *nix systems, you can run the following command to automatically install Composer:

curl -sS https://getcomposer.org/installer | php

Copy after login

Composer’s installation program will do some checks on the system environment and give some suggestions for configuration modifications. Try to follow its prompts when possible. Once everything is ready, you can use Composer to install Symfony. Run the following command:

php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.3.1

Copy after login

/path/to/webroot/Symfony in the above command is the path you want Symfony to be installed to, and 2.3.1 is the version number. When you read this article, this number is probably not the latest Symfony version. You can go to http://symfony.com/download to get the latest version number and replace it with it.

Whether you install it manually or use Composer, you can finally see the file structure of the project in the installation directory you selected.

If you are using Apache's web server, and assuming that Symfony is located in the Symfony directory in the root directory, you can use the following URL to see the successful installation of Symfony.

http://localhost/Symfony/web/app_dev.php

If you use Nginx, more configuration work may be required, which will be further introduced in subsequent articles.

Readers who are interested in more PHP-related content can check out the special topics of this site: "Summary of PHP office document operation skills (including word, excel, access, ppt)", "Summary of PHP date and time usage", "php-oriented "Introduction Tutorial on Object Programming", "Summary of PHP String Usage", "Introduction Tutorial on PHP MySQL Database Operation" and "Summary of Common PHP Database Operation Skills"

I hope this article will be helpful to everyone in PHP programming.

Articles you may be interested in:

  • Detailed explanation of controller usage in Symfony2 study notes
  • Example analysis of controller usage in Symfony2 development
  • Symfony core classes Overview
  • How to create a project using symfony commands
  • Symfony implementation behavior and methods of obtaining request parameters in templates
  • Shortcut variable usage examples of Symfony templates
  • Detailed explanation of project creation and template setting examples of Symfony2 framework
  • Plug-in format analysis of Symfony2 study notes
  • Detailed explanation of system routing of Symfony2 study notes
  • Detailed explanation of template usage of Symfony2 study notes
  • In-depth explanation of the Symfony control layer

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1111337.htmlTechArticleSymfony installation and configuration method, symfony configuration method This article describes the installation and configuration method of Symfony with examples. Share it with everyone for your reference, the details are as follows: Manually installing Symfony is very simple...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template