This article to the Code Farm Introduction Typecho Blog Article views statistics plug-ins stat, need to code farmers can refer to.
My new blog using the blog system is the Typecho blog system, the use of the time found that the blog system itself
However, there is a situation that cannot be prevented:
After the user submits the form, click the browser Back button to return to the form page, this time the browser will be directly from the cache to remove the page, so token verification must
Issue background
After updating the smarty template for the game.37.com Business , multiple Error Records appear on the server . errors in the PHP error log are as follows:
[16-may-2016 15:46:01 Asia/shanghai] PHP Fatal error:call to undefined
Shuffle () Definition and usage
The shuffle () function rearranges the elements in the array in random order.
Returns TRUE if successful, otherwise FALSE is returned.
Note: This function assigns the new key name to the cells in the array. This will
One, gets the UNIX timestamp for the specified date
Strtotime ("2009-1-22") examples are as follows:
1.echo strtotime ("2009-1-22")
Results: 1232553600
Description: Return January 22, 2009 0:0 0 seconds timestamp
Second, get the English text date
After a period of debugging analysis, found that there is a function to write a very messy, it is estimated that the revision of the time has not changed, after a period of time to modify debugging, finally the normal generation of the 4-level page,
I. Structure of the document
Create 3 folders
Controller folder holds director files
View folder holds views file
Model folder holds data files
Establish 1 index.php as the sole entrance
Second, the controller
We set up a democontroller.php file
You do not have to strictly abide by these principles, and you will not be punished by a religious penalty against them. But you should think of these principles as alarms, and if you violate one of them, the alarm will ring. -----Arthur J.riel
(1)
This paper describes the Jfactory::getdbo usage of Joomla database operation. Share to everyone for your reference, as follows:
Jfactory is a static class that gets references to various system objects
Getdbo get the database connection object code
The goods are learned from the "Enterprise Application Architecture Model" of Martin great God, and the features of the auxiliary PHP Dynamic language can be deferred loaded (lazyload) much more easily than Java. The rationale is that a virtual
The + operator appends elements of remaining keys from the right handed array to the left handed, whereas duplicated keys is not overwritten.
Today I see PHP manual again, only to know
Copy the Code code as follows:
$a = Array ("A" = "Apple",
The solution is as follows and the other frameworks are identical.
Source code (/system/libraries/upload.php 199 line)
$this->file_type = Preg_replace ("/^ (. +?);. *$/"," \\1 ", $_files[$field [' type ']);
Modified to read as follows:
Copy the
For more information, please refer to: ISBN-wikipedia, here's a brief description of what the ISBN code is:
ISBN (International Standard book NUMBER,ISBN; intended pronunciation is-ben), is the code of international Books or independent publications
Copy the Code code as follows:
$f =fopen ("Test.txt", "WB");$text =utf8_encode ("a!");Use the function Utf8_encode to change the data you want to write to the UTF encoding format.$text = "\\xEF\\xBB\\xBF". $text;"\\xEF\\xBB\\xBF", this string
That is, if you assign a string value to the variable Var,var it becomes a string. If you assign an integer value to Var, it becomes an integer.
The type casts in PHP are very similar to those in C: precede the variables to be converted with the
PHP Get file absolute path
Copy the Code code as follows:
Echo __file__; Get the absolute address of the current file, result: D:\www\test.phpecho dirname (__file__); Get the absolute directory where the current file is located, Result: D:\www\
Configuration of the 1,smarty cache:
$smarty->cache-dir= "directory name"; Create a cache directory name
$smarty->caching=true; Cache is turned on, false when caching is not valid
$smarty->cache_lifetime=60; Cache time in seconds
Use and purge of
Have looked for a JS version, but to the UTF8 code can not be used, so it produced a self-written idea. In fact, my implementation of this code is very simple, just a replacement character set process, I believe most people can write it out. The
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