Objective
Reflecting on some of the things that have been written recently, some little feelings
For coder who have studied Java or C + +,
The old grammar doesn't mean anything, OOP, the technology of exception
Not to look at the simple instance code,
Don't know can Google ~
start!
Temporarily not in the blog to write dead knowledge, or temporarily in the blog to write blog it ~
The plan is the first instance of the practical PHP and MySQL book.
A good storage model is required
3 tables that need to be established in a database
Match each data with the associated ID
The general logical framework of blogs
config.php
Features: Provides constants, typically some simple configurations.
Content:
Database---[host] [username] [password] [dbname]
Blog related---[blog name] [author] [home page root directory]
header.php
function: Give each blog page the initialization work
Content:
Blogs at the top of each page are titled---HTML
Database Connection---MySQL
Log in to verify---the correct login can be blog management---SESSION
footer.php
Function: Add the author logo at the bottom of each page.
Content: ©matter
index.php
Features: Show articles, view comments, show previous articles
Content:
In the database query article---MySQL
Show article title and content---PHP
viewentry.php
Features: Use anchor points, view comments, and add comments
Content:
First verify, get ID number---Get
Connect to the database to find the article that corresponds to the ID---MySQL
Find All comments---MySQL
Show articles, Comments---PHP
The form---the HTML that submitted the comment
viewcat.php
Function: Browse by Category
Content:
Determine the ID of the request---PHP
Show all articles under the corresponding ID---MySQL
login.php
Function: Login---session
logout.php
Function: Log Out---session
addentry.php
Features: Add article www.2cto.com
Content:
Verify User---Session
Write categories and articles---HTML
Adding content to a database
updateentry.php
Features: Modifying articles
Content:
Verify
Update command for Database
Coding Small Harvest
1.date () Time format
Date () symbol |
Date |
D |
Sat |
D J |
Sat A |
D JS |
Sat th |
D JSF |
Sat 12th May |
D JS FY |
Sat 12th May - |
D JS F Y g |
Sat 12th 3 |
D JS F Y G. |
Sat 12th 3 . |
D JS F Y G.I |
Sat 12th 3. . |
D JS F Y G.ia |
Sat 12th 3.06 PM |
2. Page design, you can use the header and footer files, to produce a fixed effect
3.SQL Statement Simple format: Select (select)--where (conditional)--order by (sort)--desc (reverse)--limit (limit)
4. Save some configuration information constants with the config.php file
5. Overview of the use of $_get and $_post super global variables
6. Use your hands. Programming practices for databases and Web pages
Small Impressions
This is my first Php+mysql small program, the motive is to learn PHP when I think grammar in place, want to try hackers. But a lot of difficulties have been encountered.
The good side
Learn about the process of deploying a blog on a server, and how it works.
Have a certain understanding of PHP's role in programming
Use MySQL and page interaction
Learn about anchor points, sessions, etc. that were previously just heard.
The bad side
With the book code, the overall feeling is not enough (summed up in the blog, a clear point of it).
HTML layout and CSS style is not well mastered, both of which lead to my page is always confusing.
And the SQL language is not very good, only will be very "simple" operation, not grasp the feeling is obvious
In a word, I have a clear sense of the direction of my learning PHP. Hope to make further efforts in the future!!!
Excerpted from matter605924657
http://www.bkjia.com/PHPjc/478242.html www.bkjia.com true http://www.bkjia.com/PHPjc/478242.html techarticle preface to reflect on some of the recent writing, some small feelings for the study of Java or C + + coder, the old grammar also does not mean, OOP, anomalies, such as the technology is not to look at the simple example code ...