PHP Learning Notes (ii) Learn basic PHP syntax and directory structure, learn the basic grammar of Notes _php tutorial

Source: Internet
Author: User
Tags learn php php and mysql php book knowledge base

PHP Learning Notes (ii) Learn basic PHP syntax and directory structure, learn the basic grammar of notes


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  //Turn 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//Shut down 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

<?php phpinfo ();? ><?php echo "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

Untitled<?php $y =date (' y '); echo "{$y}"; if ($y >10) {  echo "is currently greater than 10 and is currently {$y}";   } else{  }  ?>

④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


PHP and the basic syntax of the database has a basic understanding of the recommendation of a full project PHP book?? I really want to learn PHP

"PHP and MySQL Web development" This "PHP Bible", compared, "0 basic PHP" compared to beginners, read this book is easy to feel the author is written attentively.
This book is actually a "0 basic programming" series of one of them, the others are very good.
The design of the content is very good. There is a preface, written very pertinent, is the programmer veteran's advice to rookie, excerpts from this:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Some points to note in learning programming:
1. Do not rote grammar: many beginners try to memorize all kinds of grammar, in fact, this is extremely wrong, the program development of grammar ﹑ specification is particularly many, it is impossible to remember, you just know that there is such a function can be, when needed to read books, or find help files, so save time and effort.
2. Many hands, more practice: Only know the dead moreing people, is not to become a master of development, only a lot of computer programming, in order to improve the understanding of the program in practice.
3. Encounter problems, first try to solve their own: first use one in the time, try to solve, really do not go to find someone to help, do not encounter problems immediately ask someone to help, so never improve much.
4. Multi-use Google,baidu: Network is a big knowledge base, is the best teacher, you have encountered problems, others have encountered, more to search for it.
4. Read other people's source code: To understand other people's design ideas, and constantly melt into use.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The disadvantage of the book is that there is no line tag in front of the code, and in the interpretation of the code to use a lot of "in XXX line," a big mistake.

Summary: In terms of knowledge, "0 basic PHP" may not be complete, but we need not a dictionary, we need a persuasive book, learn to be interested, is not it?

The PHP Practice level route I have a programming basis, and has learned the basic PHP syntax

All right
First find a book to get started with PHP, to do a query database programming
Finished, skilled, to find an open source project to do two times development
such as Ecmall, Ecshop, Phpcms and so on, online a search a lot of
Familiar with MVC, familiar with the framework ...
And then there's no more.

http://www.bkjia.com/PHPjc/857734.html www.bkjia.com true http://www.bkjia.com/PHPjc/857734.html techarticle PHP Learning Notes (ii) Learn basic PHP syntax and directory structure, learn the basic grammar of notes through this lesson, 1. Understanding the directory structure of Appserv 2. We can understand the basic syntax of PHP ...

  • 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.