laravel installation and configuration tutorial, laravel configuration tutorial_PHP tutorial

WBOY
Release: 2016-07-13 10:15:42
Original
915 people have browsed it

Laravel installation and configuration tutorial, laravel configuration tutorial

System environment requirements

apache, nginx or other web server;
Laravel uses some powerful features of PHP, so it needs to be executed on PHP5.3 or higher;
Laravel uses the FileInfo library (http://php.net/manual/en/book.fileinfo.php) to detect the mime type of the file. This library is included by default in PHP5.3, but in Windows users need to Enable this module in php.ini. If you don’t understand, you can look here: http://php.net/manual/en/fileinfo.installation.php;
Laravel uses the Mcrypt library (http://php.net/manual/en/book.mcrypt.php) to encrypt and generate hashes. Before using this framework, you need to ensure that this extension is installed. You can pass phpinfo(); Check whether it is installed correctly in the web server. If not, you can check: http://php.net/manual/en/book.mcrypt.php;

Install laravel

Download laravel: http://laravel.com/download;
Unzip the compressed package file and upload it to the web server;
Set the value of key in config/application.php, you can set a random content composed of 32 strings;
Verify whether storage/views is writable;
Access your application in a browser;

At this point you have completed a Laravel installation, there are more things to know here.

Extra Content

Install some additional extensions below so you can get the most out of Laravel

SQLite, MySQL, PostgreSQL, or SQL Server PDO drivers.
Memcached or APC.

Question?

If you have installation issues, try the following:

Make sure the public directory is the root directory of your site (see server configuration below)

If you use mod_rewrite, set the index item in application/config/application.php to empty.

Verify that your storage folder is writable.

Server Configuration

Here we guarantee a basic apache configuration. Our Laravel root directory is: /Users/JonSnow/Sites/MySite

The configuration information is as follows:

Copy code The code is as follows:


DocumentRoot /Users/JonSnow/Sites/MySite/public
ServerName mysite.dev

Note: We installed to /Users/JonSnow/Sites/MySite and our DocumentRoot to /Users/JonSnow/Sites/MySite/public.

The Windows environment is used to get started with Laravel, but you are not required to use Windows. You can do it under your favorite system.

The installation of the PHP operating environment is beyond the scope of this tutorial. Here we only explain the basic requirements.

Web server:

PHP 5.3 and above
PDO module
Mcrypt module
MYSQL database
The environment used in this tutorial:

PHP 5.4.5
MYSQL 5.0.45
Install Laravel framework:

Download the Laravel framework: Laravel official download | Github download
Unzip the framework to the server directory
The Laravel framework is installed in a simple two-step process. To test whether the installation is successful, visit:

in the browser

http://localhost/public/

The public directory is the folder that comes with the framework. If you see the initial interface of laravel, it means that it has been installed successfully.

How to install laravel offline

Generally, it is downloaded and installed using dependency management. If you need to install it offline, install it on a machine first and then copy the file as an offline package.

Upload laravel to the server

For Apache server, .htaccess file is used to control file access and jump. Laravel’s public also has .htaccess file to control routing.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/902777.htmlTechArticlelaravel installation and configuration tutorial, laravel configuration tutorial system environment requires apache, nginx or other web servers; laravel uses PHP Some powerful features, so it needs to be in P...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!