Method 1: Use {include file = "child. tpl"} in the parent template to directly include the subtemplate.
Advantages:
1. It is conducive to the division of modules and the reuse of templates.
2. When there are not many nested layers, the template
Verification CodeStrtolower ($ str) to lowercaseStrtoupper to uppercaseYou can use AJAX and many other methods when you need to pass a value to this object,Var url = "xxx. php ";Var data = {};$. Post {url, data, function (){If (data ){Alert (data); /
Let's take a look at the detailed description of this problem:View sourceprint? A group of monkeys are arranged in a circle and numbered by 1, 2,... and n. Then start counting from 1st, count to m, kick it out of the circle, start counting from
So yesterday, I did it seriously. I have more features and can perform statistical analysis on various search engines. It can be viewed in multiple time periods. In fact, the code is very simple. For the sake of simplicity, the code is compressed to
When the number of arguments is Compile a function in PHP. Generally, when calling a function, the changed value is a form parameter rather than a real parameter. However, if an address character is added to the form parameter, the value of the real
I. Set cookie You must set the cookie before using the cookie.Function prototype: int setcookie (string name, string value, int expire, string path, string domain, int secure)All parameters except name are optional and can be empty strings.Attribute
Php interview questions are as follows:Copy codeThe Code is as follows:$ A = 1;$ X = & $;$ B = $ a ++;?> Q:What are the values of $ B and $ x?The answer to the php interview question is as follows:$ B = 1;$ X = 2;Do you understand? I don't
Copy codeThe Code is as follows:/*------------------*///-Obtain the list data of an unlimited category/*------------------*/Function get_sort ($ parent_id = 0, $ n =-1){Global $ db;Static $ sort_list = array ();$ SQL = "SELECT * FROM". $ db-> table (
Because I prefer SQL injection.Many websites, such as aspphpjsp, have been detected before, after, and after.It is found that the md5 encryption algorithm is basically used.It is said that MD5 cannot be undone.MD5 cannot be reversed, but it can be
The member table structure we want to useCopy codeThe Code is as follows:Create table if not exists 'net _ 111cnnet '('Id' int (11) not null auto_increment,'Username' varchar (32) default null,'Add _ time' int (11) default null,'Email 'varchar (50)
Recently, I developed social game and found that it is still quite common to use it. Here I will make a summary to help you remember and hope to help you.First, let's look at the requirements. If we develop social game on facebook, we need to call
The concept and implementation of Process Communication in Linux can be viewed: http://www.ibm.com/developerworks/cn/linux/l-ipc/The concept and implementation of message queue in Linux system can be viewed:
1. Supports Group Sending (if you need to group multiple numbers, separate them with commas (,) (159, 159 ..))2. Supports data submission in POST or GET mode.Site interface:Http://api.heqee.com/fetion? Username = Feixin mobile phone number &
Sometimes this error message suddenly occurs when phpMyAdmin is used."You cannot create a session when an error occurs. Check the PHP or website server logs and correctly configure PHP installation"I don't know how it actually caused this error.
Php code is relatively simple:Copy codeThe Code is as follows:$ P = $ _ GET ['P'];$ Pics = file ($ p );For ($ I = 0; $ I {Echo $ pics [$ I];}?> Usage: Save the file as I. php and upload it to the root directory.Change the image address that cannot
Copy codeThe Code is as follows:// $ Rptype = 0 indicates that only the html Tag is replaced.// $ Rptype = 1 indicates replacing the html Tag and removing consecutive white spaces// $ Rptype = 2 indicates replacing the html Tag and removing all
File_exists () check whether the file or directory existsDescriptionBool file_exists (string filename)If a file or directory specified by filename exists, TRUE is returned; otherwise, FALSE is returned.The dirname () function returns the directory
Copy codeThe Code is as follows:/* Obtain the image News list */Function getPicNews ($ number = 5 ){Require_once 'include/content_class.php ';$ Content = new Content ();$ SQL = 'select contentid as id, title, pic, typeid from 'cms _ content' where
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