Through this class,
1. Understanding the APPSERV directory structure
2. We can understand the basic syntax structure of PHP
1 My Appserv installation directory is e-drive:
① using the command line to operate the Apache server
Apache server open and close:
Httpd-k Restart//restart
Httpd-k Stop//Off
Httpd-k Start//Open
If you modify the port, you can modify it in the following directory:
Httpd.conf in appserv\apache2.2\conf (Master profile)
② using the command line to operate the MySQL database
MySQL database is turned on and off:
net stop MySQL//shutdown database
net start MySQL//Open database
③mysql Database Server Description:
1. Installation path: E:\AppServ\MySQL
2. Command path: E:\AppServ\MySQL\bin
3. configuration file: E:\AppServ\MySQL\my.ini
4. Database Storage directory: E:\AppServ\MySQL\data
E:\AppServ\MySQL\data\mysql
. FRM table Structure
Columns_priv. MYD table Data
Columns_priv. MYI Index
④php's distribution file
C:\Windows\php.ini
①php Mark
Write a PHP program index.php
<?phpphpinfo ();? >
<?phpecho "Hello world";? >
② Note: PHP code can be written only in a. php suffix file, and the PHP code must be unloaded between <?php?>
③ write HTML code in PHP, nested PHP tags in html
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
④php notes:
/* * * Multi-line Comment
Single-line Comment
⑤. Instruction Separator
Must end with;
⑥.php Code Writing format, note indentation, {code snippet}
⑦.php a blank line between a statement and a function, a function and a function
Up and down with curly braces, separated by blank lines, easy to read
⑧. Variables
The name should be meaningful, don't use letters, individual numbers, or Chinese
The file name and directory name do not use Chinese