Thinkphp implements a way to permanently modify front-end view pages in a visual background management
I've been wondering about things, just like csdn, users can modify their own home page style, but also permanent changes, a lot of places are invited, the view style to the user this is the trend of future development, want to QQ space dress, and even some of the construction station program backstage are like this, so, It is very important to understand this principle.
First of all, this is obviously not possible through the front-end to achieve, because the first part of the user there is ultimately put into memory, memory is volatile, then it should be placed in the background, the same, we can not directly modify the background files, so the cost is very large, then we have to put them into the database, Database data in the presence of hard disk, not easy to lose, and through the background files are also easy to operate, so that the idea came.
In the background of the visual management interface, storage of various styles of buttons, forms, etc., including the specific modified pages, in the database, storage is the foreground view of the style data, which is missing a connection, but smarty the perfect solution to the problem, and the separation of data, modification is the modification of the database data, Extraction is the extraction of the database style, which is the core principle.
Here is a copy of my example code for 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 (); }}
<title></title>Test race
http://www.bkjia.com/PHPjc/997427.html www.bkjia.com true http://www.bkjia.com/PHPjc/997427.html techarticle thinkphp implements the method of permanently modifying the front-end View page in a visual background management I've been wondering about things, just like csdn, users can modify their own home page ...