Since he was the same team, I was very familiar with his "neat" approach, I also very much agree with his many points of view, but one of the most incomprehensible is that the design of the database will always avoid the use of date/time type. His
1. Download an integrated environment software, that is, others put all the chaos seven or eight in a piece, made software, this is the SG-style, I think beginners with this good point;
2. Download and install them separately. Php.zend.apache; This
Copy CodeThe code is as follows:
/*
* Function: PHP image watermark (watermark supports picture or text)
Parameters
* $groundImage background image, that is, need to add a watermark image, temporarily only support gif,jpg,png format;
* $waterPos
2. Date_default_timezone_set ("PRC");
3. PHP 5.1 or more
Ini
Date.timezone = PRC
Dolly Mix
Set the time zone, php5 new.
and find it in php.ini.
[Date]
; Defines the default timezone used by the date functions
Date.timezone =asia/shanghai
Modified as
Today, when capturing system time with Echo $showtime =date ("y-m-d h:i:s"), it is found that the acquisition time does not match the time of the system.
It was found that the default time for PHP is in Greenwich time zone, so we have to change
Always forget a sentence to put in which file, directly all kill ...
Copy CodeThe code is as follows:
if (!isset ($dir) or empty ($dir)) {
$dir =str_replace (' \ \ ', '/', dirname (__file__));
echo "". $dir. "";
} else {
$dir =$_get[' dir '];
echo
This article mainly introduces the PHP simple socket Server Client code example, this article gives two versions of the server port, the code of the problem and improvements are described, and the use of this socket server client code, the need for
Copy CodeThe code is as follows:
Class TEST
{
Const NAME = ' value '; Constant
Public $name = ' value '; Property
Public Function name ()//method
{
echo ' value ';
}
}
?>
In this context, attributes and methods can be used to further
By default, the __clone method will establish an object that has the same properties and methods as the original object. If you want to change the default content when cloning, you need to overwrite (attribute or method) in __clone.
A cloned method
Note: This is the code specification from the PHPCMS development documentation, although it is known as the development specification for PHPCMS, but I think all PHP programming is the same. Write so much php, a lot of coding compared to this
1, if the method of the class can be defined as static, as far as possible to define as static, it will increase the speed of nearly 4 times times.
2. The speed of $row [' ID '] is 7 times times that of $row[id].
3. Echo is faster than print, and
1. Why does PHP choose MySQL as a database?
2. mysql Database creation user
This article mainly writes the difference that the MySQL creates the user's statement, turns from the Isher the Blogspot, because in the writing thought why does not
However, it is not easy to be a master of PHP programming. Not as many people think, as long as you can quickly write a few simple code to solve a complex problem is the PHP programmer, the real PHP master also need to consider more other issues.
When writing a PHP program, some code is used to handle some transactions, such as manipulating databases, doing mathematical operations, and some other code is just the result of transaction processing, For example, some of the PHP code that uses
Note: All of the following functions do not use a regular.
The above is to remove the first matching three functions for the same purpose
function Str_cut ($str, $start, $end) {//Remove first match, highest efficiency, first split and
Download the latest smarty:http://smarty.php.net/
Current Latest Version: 2.6.18
After decompression, rename the Libs directory in the directory to smarty, copy to your site directory, and build templates and Templates_c two directories under the
smtp.class.php
Copy CodeThe code is as follows:
Define (' smtp_status_not_connected ', 1, TRUE);
Define (' smtp_status_connected ', 2, TRUE);
Class SMTP
{
var $connection;
var $recipients;
var $headers;
var $timeout;
var $errors;
var
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