Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the basic syntax and directory structure of PHP

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report