ThinkPHP implements permanent modification of the front-end view page in the visual background management. ThinkPHP implements permanent modification of front-end view pages in visual background management. I have been wondering about things like csdn, users can modify their home page ThinkPHP to implement permanent modification of the front-end view page in the visual background management.
I have been wondering what to think about. like csdn, users can modify their home page styles on their own and make permanent changes. Many places have been visited, handing over view styles to users is also a trend of future development. if you want to dress up your QQ space or even the background of some website construction programs, it is very important to understand this principle.
First of all, this obviously cannot be achieved through the front-end, because something in the front-end is put into the user's memory, and the memory is volatile, so it should be placed in the background, the same, it is also impossible for us to directly modify the background files. this is very costly, so we need to put them into the database. The data in the database is stored in the hard disk and is not easy to lose, it is also easy to operate through background files. in this case, the idea is coming.
In the visual management interface of the background, store buttons and forms of various styles, including the modified pages. in the database, store the style data of the foreground View, there is a lack of connection in the middle, but smarty perfectly solves this problem and separates the data. the modification is the data of the modified database, and the extraction is the extraction of the database style, this is the core principle.
Here is a copy of my instance code for your reference only:
select(); $info->id='2'; $info->value=$_POST[value]; $info->save(); $bg=$temp[1]['value']; $size=$temp[4]['value']; echo $bg; echo ""; echo $size; $this->assign(bg,$bg); $this->assign(size,$size); $this->display(); }}
Test competition
I have been wondering why, just like csdn, users can modify their home pages on their own...