Home >Backend Development >PHP Tutorial >DreamWeaver imitation station study notes (1)
【PHP】Dreamweaver imitation site study notes (1)
The imitation site is to imitate the target website. The imitation website mainly imitates the page style and function.
What we usually call imitating a website is using CMS (Content Management System) as the backend of the website, and what is imitated is the static template of the target website. DEDECMS has relatively simple tags and is the first choice for imitating PHP websites.
Preparation
1. Target site (make sure you want to imitate the site)
2. Software
Steps
1. Create dede template
2. Analyze the website, Make dede template
1. First save the source file
(1) Right-click on the blank space of the web page to view the page source code, ctrl+A, ctrl+C, use DW to open index.htm, ctrl+V to save the source code Copy and paste it in, and click the blue font on the source code page to open the css and js saved in the previous style folder.
(2) Open the downloaded css image downloader, enter ① the path to the images established in step 1, ② the web page URL to be downloaded, ③ download, use the css image downloader to download the image directly to the specified location , saving a lot of tedious steps
2. Secondly, analyze the website. Take the following website as an example. There are three items in the home page navigation bar, which can be clicked to different web pages.
corresponding to dede, we can build three columns to implement , remember to create the column or click Generate after each update. The same goes for the homepage, otherwise there will be problems with the webpage (note: usually the contact page, optional cover template)
3. Convert the code
(1) Since we are Make the dede template, so we need to replace part of the code, open the Lao Li imitation site dedicated tool, and use the generated dede code to replace the following code
(2) Through code analysis, use a for loop to complete the navigation bar code replacement
Before replacement
After replacement
4. Update and debugging
The replaced website, homepage, and columns will be updated separately, open the browsing check, and debug until there are no problems
The above introduces the Dreamweaver imitation station study notes (1), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.