Get the App
SLTechnology News&Howtos  ›  Development  › 

How to understand the basic syntax and directory structure of PHP

Shulou Source: shulou.com Published: 2022-06-03 09:01:43 11月15日 Update

This article mainly explains "how to understand the basic grammar and directory structure of PHP". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to understand the basic grammar and directory structure of PHP".

1. Understand the directory structure of AppServ

two。 We can understand the basic grammatical structure of PHP

1 my AppServ installation directory is E disk:

① uses the command line to operate the apache server

Turn the apache server on and off:

Httpd-k restart / / restart httpd-k stop / / close httpd-k start / / enable

If you modify the port, you can modify it in the following directory:

Httpd.conf in AppServ\ Apache2.2\ conf (main configuration file)

② operates mysql database on the command line.

Opening and closing of Mysql database:

Net stop mysql / / close the database net start mysql / / Open the database

③ Mysql database server description:

1. Installation path: e:\ AppServ\ MySQL

two。 Command path: e:\ AppServ\ MySQL\ bin

3. Configuration file: e:\ AppServ\ MySQL\ my.ini

4. The directory where the database is stored: e:\ AppServ\ MySQL\ data

E:\ AppServ\ MySQL\ data\ mysql

.frm table structure

Columns_priv.MYD table data

Columns_priv.MYI index

Coordination file of ④ php

C:\ Windows\ php.ini

① php markup

Write a php program, index.php.

② Note: only php code can be written in files with the .php suffix, and php code must be unloaded between

③ writes html code in php and nests php tags in html

Untitled

④ php comments:

/ * / Multiline comments

/ / single-line comments

5. Instruction separator

Must end with; end with

⑥ .php code writing format, note indentation, {code snippet}

⑦ .php statements and functions, blank lines between functions

Braces above and below, separated by blank lines, easy to read

8. Variable

Names should be meaningful, not letters, individual numbers, or Chinese

File name and directory name should not be in Chinese

Thank you for your reading, the above is the content of "how to understand the basic syntax and directory structure of PHP". After the study of this article, I believe you have a deeper understanding of how to understand the basic syntax and directory structure of PHP. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Directory structure data database syntax code file function command server comment learning service between content method blank line path Chinese configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia macOS Shulou Tech Info OPPO Reno vpn