Getting Started with PHP

WBOY
Release: 2016-08-08 09:29:46
Original
1128 people have browsed it

z

PHPfull name:Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor" is a general open source scripting language, mainly used for Web application development (commonly known as website or backend!), starting from 5.0 Support object-oriented, some words are omitted below...

1. Editing software:

PHPStorm for mac 2, a useful PHP development tool.

2. Operating environment:

Running environment:XAMPP for mac3 integrates the running environment of MySql and PHP. After the installation is complete, start (sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start)

How to start writing code

1.First use PHPStormCreate a new project


2.Save the project in the specified directory


After the project is successful, it should be purple The

4.Create a new PHP file
in the project

5.Now we can write code

Add code in the new PHP file: echo "hello PHP!";

6.Run the code

PHP The code needs a running environment to execute. The XAMPP we installed is an integrated environment for PHP development and operation. Now we copy the project directory to XAMPP In the htdocs directory of , professionals call this process "publish"(actually it is copy, as for where to copy, it depends on which server you have ), every time you modify the code, be sure to publish and check the results again. The next moment to witness the miracle has arrived, enter in your browser:

http://ip address (localhost)/project name/PHP file name.php (if there is a folder, add the folder Name)

For example: http://localhost/MyFirst/Helloworld.php

PS: If the browser has not changed, please make sure you typed the address and hit Enter.

PS:If it is garbled code, you can change the encoding or type:

PS:If it is an error 404, The path is wrong, please check the path you entered.

Okay, that’s it for now.



The above has introduced the introduction to PHP, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
php
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!