_php instance of Symfony installation and configuration method

Source: Internet
Author: User
Tags php database

This article describes the installation and configuration methods of Symfony. Share to everyone for your reference, specific as follows:

Manual installation of symfony is very simple, there is hardly much to talk about. Open Http://symfony.com/download, select a symfony release from the page's selection list, click Download Now, and unzip the downloaded package to a location on your WEB server, which is complete. (The choice of the highest version number is usually the best, tgz format or ZIP format is a matter of personal preference, each version of the Symfony also has a "without vendor" version, but the beginner phase is best not to choose to download this version. )

Use composer to install Symfony

Symfony has a good partner called composer, let's see how to install Symfony with composer.

Get composer

As mentioned earlier, composer is a Phar, executable PHP code pack (PHP ARchive), is a cool thing, if you are interested, https://getcomposer.org/have more information about composer.

On the *nix system, you can run the following command to install composer automatically:

Curl-ss Https://getcomposer.org/installer | Php

The composer installer does some checking of the system environment and gives some suggestions for configuration changes, possibly as much as possible. Once everything is in place, you can use composer to install the symfony. Run the following command:

PHP Composer.phar create-project symfony/framework-standard-edition/path/to/webroot/symfony 2.3.1

The/path/to/webroot/symfony in the above command is the path where you want Symfony to be installed, and 2.3.1 is the version number. When you see this article, this number is probably not the latest Symfony version, you can go to the Http://symfony.com/download page to get the latest version number, and then replace it.

Whether it's a manual installation or a composer, you can finally see the project's file structure under your chosen installation directory.

If you are using the Apache Web server and assume that Symfony is located in the Symfony directory under the root directory, you can use the following URL to see the Symfony installation successful screen.

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

If you use Nginx, you may need more configuration work, and subsequent articles will be described further.

For more information on PHP-related content readers can view the site topics: "PHP operation Office Document tips summary (including word,excel,access,ppt)", "PHP date and Time usage summary", "PHP object-oriented Program Design Introductory Course", "PHP string (string) Summary of usage, Getting Started tutorial on Php+mysql database operations, and summary of common PHP database operations techniques

I hope this article will help you with the PHP program design.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.