A class for converting PHP solar to lunar calendar
Class Calendar
{
#农历每月的天数
var $everyCMonth =array (
0=>array (8,0,0,0,0,0,0,0,0,0,0,0,29,30,7,1),
1=>array (0,29,30,29,29,30,29,30,29,30,30,30,29,0,8,2),
2=>array (
First of all you should be in PHP 5.3 and above, if the PHP version under this, it is time to upgrade. I recommend that you use the latest version if you have a condition.You should have seen PHP the right, and this article contains a lot of content
What is written in this article?Always write documents. Do not write, code can not be maintained, so have to write . But writing documents takes time and effort , and what's more scary is that it's hard to read, and it's a pain in the neck to waste
PHP5 includes some of the following important features:
• Support for the new object model and many new features of the Zend engine.
• Fully rewritten XML support with extended performance around the excellent LIBXML2 library
Example of the C extension yaf using the bird Brother's PHP demo open source code see below [PHP] Code
/**
* Get Upload Component
*
* @access Public
* @return void
*/
Public Function
Page layout
In this module we will see how to construct a standard template page using the template tagging system. In this example we use a simple HTML page layout, see:
This page is composed of several standard units, just as the page designer
I finally got this to work and so I'll post my findings here.
PHP 5:windows Build needs a MySQL DLL
PHP 5.0 doesn ' t come with MySQL support ... You has to get the librariesyourself ...
I think u can get them from mysql.com
PHP 5 Beta 2
The file
A detailed description of the Similar_text and similarity Levenshtein functions for calculating string similarity in PHP
$first = "ABCDEFG";
$second = "AEG";
Echo Similar_text ($first, $second); result output
We provided a snippet of PHP code to send mail using Mandrill, but if you do not want to use a third-party service, you can use the following P HP code Snippets.
function Send_mail ($to, $subject, $body)
{
$headers =
What is 301 redirect? 301 redirect is when your website address changes, such as changing the domain name, website revision and so on, you want visitors or search engines to jump to the new address to visit the site, then you need to do 301 redirect.
Start Gank.
Service side:
spring3.0.5+cxf2.4,jdk1.6
"Should be" auto-generated WSDL file
Client:
PHP5.1.3
The first question encountered:
Soap-error:encoding:object have no ' id ' property
But the API documentation says no ID needed to view the
PHP to implement Telnet connection, pass command, get return value and other functions!
Error_reporting (-1);
Class Telnet {
var $sock = NULL;
function Telnet ($host, $port) {
$this->sock =
PHP adds watermarks to different locations based on the color boundary of the picture
function Add_wm ($NMW _water, $src _file, $output _file, $x, $y) {
if (file_exists ($output _file))
Return
$w 1 =
Provide a little information to you:
Display_errors = On
PHP default is to open the error message displayed, we changed it to:
Display_errors = Off
When the error display is turned off, the PHP function error message will no longer be displayed to
I. Comments in the template
Each smarty template file is developed using the syntax of the web foreground language (xhtml,css, JavaScript, etc.) combined with the Smarty engine.
The web foreground is developed in the same language as the original,
We often use the PHP to take the whole function, mainly: Ceil,floor,round,intval.
Ceil--into a method to take the wholeDescriptionfloat ceil (float value)
Returns the next integer not less than value, in which value is entered if there is a
What exactly is APM?Many people are the first to hear the concept of APM, this article mainly explains how to use APM's solution to achieve the optimization of PHP application performance. First introduce APM (application performance Management),
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