PHP Background Development (i) Hello World

Source: Internet
Author: User
Tags php development environment

PHP Background Development (i) Hello World installation

Development environment for Ubuntu 12.04, select linux+apache+php development environment

Installing Apache2

sudo apt-get install apache2

Install PHP

sudo apt-get install php5

Install MySQL (note that you need to enter the root password during installation)

sudo apt-get install Mysql-server

Installing Apache's parsing module

sudo apt-get install libapache2-mod-php5sudo apt-get install libapache2-mod-auth-mysql

Installing the MySQL connection module for PHP

sudo apt-get install php5-mysql

Install the GD library for processing pictures

sudo apt-get install PHP5-GD
Launch Apache

By default, the root directory is/var/www/html

Enter Test address http://localhost/

Change the default development path

Configuration path of the default file directory for Apache2:/etc/apache2/sites-enabled/000-default.conf

The path to the development directory after modifying the contents of DocumentRoot

Path to the default profile for Apache2:/etc/apache2/apache2.conf

Permission to add a file path

Hello World

Under the development directory, open a file index.php

Input

<? PHP     Echo ";? >

Open: Address http://localhost/will see the results.

PHP Background Development (i) Hello World

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.