Three, shop project integration Picture Watermark 1, determine the use of location
Image.class.php 2, specific code configuration
1) put the water.jpg watermark image into the Admin/images folder
2) Configure the config.php file
3) Add a watermark function to the Images.class.php file
4) Add the corresponding attribute in the Image.class.php file and get the profile information
5) Determine if the watermark is present
For ease of use, you can individually encapsulate a function for file judgments and return file suffixes
6) Determine where the watermark appears
Schematic diagram
7) sample merge, generate watermark picture name and return
8) Add watermark effect to goods upload file
Detailed Code reference: Image.class.php
Operating effect:
Iv. MVC
1. What is MVC
The full name of MVC is the model View Controller, which is the abbreviation for Models-View-controller, a software design paradigm that organizes code in a way that separates business logic, data, and interfaces.
2. Why MVC is needed
PHP history
1) Mixed-programming PHP (html+css+js+php)
Advantages: High Execution efficiency
Cons: Difficult to maintain
2) Separation of the PHP business logic code (logical processing and data invocation) from the display phase
Advantages: Easy to maintain the revision
Cons: less efficient to perform
3) MVC design Ideas
3. MVC schematic diagram
V. Allocation of projects
Project requirements:
Provide a template for a Web site (HTML static page template) and use PHP to implement dynamic Web sites
1. Project structure:
L PHP Source code development
L MySQL Database
L MVC Design Ideas
2. Code Architecture
L Simple File structure
• All implemented methods or businesses must be preceded by a comment
3. Project Grouping
One row, one set.
Each group has a team leader
1. Assigning modules to team members
2. Common code writing and module integration
3, every day to report the progress of the project timely
Before 5 o'clock:
Team leader is responsible for sending the team members and the group to me through word form
The project needs and achieve the objectives, the general project planning, modules sent to me
The implementation of the static template in the project (template selection, code writing, JS effect writing, compatibility processing)
Provide help:
Web Front-section video
JS Writing Experience
Technical support
Six, Css+div and JS share
CSS code: http://www.aa25.cn/
Zen Garden: http://www.csszengarden.com/
JS Code: http://www.lanrentuku.com/js/
(insert) 20150123--image watermark and MVC-02