thinkphp implementation of the method of permanently modifying the front-end view page in visual background management

Source: Internet
Author: User

I've been wondering about opinions, just like csdn, users can modify their own homepage style, and is a permanent change, a lot of places are invited to the view style to the user this is the trend of future development, want to QQ space dress up, and even some of the background of the construction station program is like this, so, It is very important to understand this principle.

First of all, this is obviously impossible to achieve through the front-end, because the previous paragraph of things to the user where the end is put into memory, memory is volatile, then it should be placed in the background, the same, we can not go directly to modify the background file, so the cost is very large, then put them into the database, Data in the database when the hard drive inside, not easy to lose, and through the background file is also very easy to operate, so, the idea came.

Visual management interface in the background, store a variety of styles of buttons, forms and so on, including the specific changes in the page, in the database, the store is the foreground view of the style data, which is missing a connection, but smarty perfect solution to this problem, and the separation of data, modify is the modified database data, Extraction is the extraction of the database style, which is the core principle.

Here is a copy of my instance 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 Game




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.