Processing techniques for date and time
The concept of time in PHPUnix time stampProcessing of dates and times
1. PHP Time Concept
In the PHP language, date and time functions depend on the locale of the server, and PHP defaults to the standard GMT,
function Sbc_dbc ($STR, $args 2) {//half-width and full-width conversion functions, the second parameter if 0, is half-width to full-width; if 1, it is full-width to half-width
$DBC = Array (
0, 1, 2, 3, 4,
5, 6, 7, 8, 9,
A, B, C, D, E,
F, G, H, I,
Array ("Key" = "value");
Display array
Print_r ($array);
Use the compact () function to create a new array and take the parameters as a unit of the new array;
$newArray = Compact ("Red", "green", "yellow", "Blue", "array");
Use the Extract ()
PHP is used by administrators of more than 3 million Internet sites worldwide, making it one of the most popular server-side scripting languages. It is characterized by fast running, stable and reliable, cross-platform, and open source software.
SQL injection attacks are the most common means by which hackers attack websites. If your site does not use strict user input validation, it is often vulnerable to SQL injection attacks. SQL injection attacks are typically implemented by submitting
Php
function Is_mobile () {
Returns true if one of the specified mobile browsers is detected
$ Regex_match = "/(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|"
========== Character processing function =============
SQL statement reserved character escapes
Long get_magic_quotes_gpc (void)
String addslashes (String str)
String stripslashes (String str)
ASCII code for characters
int ord (string string)
File name mysql.class.php
###################### Start Introduce #######################################
MySQL Connection class
Author:bluemaple, Emaile:bluemaple@x263.net
Can perform general MySQL commands, such as Insert,delete,select,update
How
first, set a cookie
Cookies must be set before using cookies.
function prototypes: int Setcookie (string name,string value,int expire,string path,string domain,int Secure)
All parameters, except name, are optional and can be represented by an empty
Scenario Description:
In the past, when we extracted the title of the Web page, we extracted the content directly. But the reality is that, for example, a Javaeye article http://www.iteye.com/news/21643, "10 software development taught me the most
Is there a function to limit the number of words to display?
Yes! With truncate
Intercepts a length of characters from the beginning of a string. The default is 80.
You can also specify the second argument as the text string appended to the
Open PHP.ini, first find
;;;;;;;;;;;;;;;;
; File uploads;
;;;;;;;;;;;;;;;;
Area, there are several parameters that affect file uploads:
File_uploads = on; switch to allow uploading of files over HTTP. The default is on, which is
Found on the friendfeed of the Firefox plugin called Firephp, is based on the firebug of an extension, can be used in the Firebug console to facilitate the output of PHP debugging information does not affect the normal operation of PHP programs. In
We will introduce the mediator pattern, which is designed to encapsulate the interaction of a group of objects, to prevent interaction between objects, and the mediator (mediator) acts as an intermediate aggregation point between colleague Objects
Are you faced with creating a site that is created by a programmer (probably you) and a designer at the same time? Don't you know how to make the job easier for both of you? Let me give you the answer: use Fasttemplate to make your site easier to
In PHP, there are many functions for working with text, you can use the text to be processed through the function, then call the Smarty template engine assign () assignment to the variable, assigned to the template for display.
The variable
Recently did a while to optimize the performance of the program, there is a more interesting idea, want to put forward to communicate with you.
Cache is a typical application mode of "space-time" strategy, which is an important method to improve
I. Preface:
Version info: okphp BBS v1.3 Open source version
Due to the reasons of PHP and MySQL itself, php+mysql injection is more difficult than ASP, especially the construction of the sentence at the time of injection is a difficult point,
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