In PHP, the definition of a string can be in English single quotes ', or you can use double quotes in English.
But you must use the same single or double quotes to define strings, such as ' Hello World ' and ' Hello World ' for illegal string
To agree on several directories
/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniI. PHP-FPM startup parameters
#测试php-FPM
ImageMagick Introduction:
ImageMagick is a powerful, stable, and open source Toolset and development kit that can be used to read, write, and process picture files in more than 89 basic formats, including popular TIFF, JPEG, GIF, PNG, PDF, and
PHP code $STR = Preg_replace ("/() (. *?) ()/", ' \1\2\3", $str); The uses three sub modes (one in each parenthesis), the first one is the link start tag, the second is the link text, and the third is then \1, \2, and \3 in the second argument,
The article has incorrect or the rhetoric is not clear place, the trouble everybody pointed out ~ ~ ~
The configuration and functions associated with the PHP string escape are as follows:
1.magic_quotes_runtime
2.magic_quotes_gpc
3.addslashes ()
PHP Date-time function date ()
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Capital Y represents a four-digit year, while lowercase y represents a two-digit number for the year;
Lowercase m represents the number
Introduction
Today, when teaching others to use Protobuf, accidentally found a php cli mode of the strange problem, the cost of a long time to find a solution, here to share.
Problem description
We introduced the PROTOBUF protocol first here,
Decimal Example:
PHP retains two decimal places and rounded up
Copy Code code as follows:
$n = 0.1265489;
Echo sprintf ("%.2f", $n); 0.13
You can see we used the sprintf function to format the $n%.2f is the target format,
1. Create WSDL
Description
A, non-standard webservice, may only be able to access PHP
B, the standard webservice, you have to use the WSDL (WebService description Language, is to use the XML syntax standard to describe your service content, I
Summarize:
The operation of using PHP to download files requires four headers () to refer to my other blog post: How PHP implements the download function hyper-Detailed process analysis
When calculating the size of a file, you do not need to open
This article describes the PHP connection mssql2008/2005 database (SQLSRV) configuration method, share for everyone to reference. The specific methods are as follows:
PHP connection mssql2008/2005 Database with the previous connection mssql2000 is
Time (): Returns the current UNIX timestamp; date (): formats a local timestamp; Mktime (time, minute, second, month, day, year): Gets a timestamp of a date; Strtotime (): Resolves the datetime description of any English text to a Unix timestamp
What happens if the program does not have an error-handling mechanism? There may be problems at times.
Example: A more robust program:
if (!file_exists ("Aa.txt")) { echo "file does not exist"; Exit ();}else{ $FP =fopen ("Aa.txt", "R"); echo "
As we all know, PHP is a very good dynamic web development language (fast, short development cycle ...). )。 But only a few people realize that PHP can also be a good language for writing shell scripts, and when PHP is the language that writes the
Remove the index.php from the URLThinkphp as a PHP framework, is a single entry, then its original URL is not so friendly. But thinkphp provides a variety of mechanisms to customize the desired URL format, in conjunction with Apache. htaccess files,
In PHP, the values stored in the array become array elements, the array has a one-dimensional array and a multidimensional array, and the index of each array element is also called the keyword, and access to the array elements can be indexed.
1, bitwise operatorsThe bitwise operator is used to set the specified bit of an integer number, and if the operand is a string, the ASCII value of the string is manipulated.
Type of operation
Operator
Example
Results
Parse the PHP functions that control user login and determine user login in WordPress. wordpress User Login
Login function: wp_signon ()
Function introduction:The wp_signon () function is used to authorize a user to log on to wordpress and remember
We currently provide the following:100 MB space and 1 GB bandwidth/monthDatingOne-day FTP account3rd email account3rd MySQL database2nd sub-accountsThere is absolutely no advertisement INFORCED or requirement. You can also freely place ads like
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.