Abstract: uploading files larger than 8M requires the configuration of PHP to be modified to take effect. But I found a lot of information on the Internet to modify the configuration, but I did not take effect after the modification.
Workaround:
Magic constants:1. __line__Returns the current line number in the file.
2. __file__Returns the full path and file name of the file. If used in the include file, the include filename is returned. Since PHP4.0.2, __file__ always contains an absolute
Make a picture upload, dead and alive, and later found to be a problem with the configuration of PHP parameters.
The following summarizes the file upload related to the PHP parameters, Memo ~
All of these parameters are set in
#author: Zhxia
Put a php-fpm patch on PHPsudo tar jxvf php-5.2.14.tar.bz2sudo patch-d php-5.2.14-p1
Compiling PHPCD php-5.2.14/sudo./configure--prefix=/usr/local/php-5.2.14--with-mcrypt--with-gettext--with-mysql--with-gd--with-jpeg-dir--
Recently, data statistics were calculated using PHP's MONGO extension, which had a timestamp field that was 13 bits long because it was accurate to milliseconds, but because it was stored as a string at the beginning:
Copy CodeThe code is as
We sometimes need a custom profile in the CI framework, so how do we handle it? Here is the way to introduce you to the process.
configuration file config/expert.php
Copy CodeThe code is as follows:
/**
* Expert configuration file
*
* @author XXX
*
When doing mobile phone development, often encountered some more time-consuming operation, this time the progress bar began to come in handy.
This demo shows the ProgressBar progress bar and the ProgressDialog progress box.
First, ProgressDialog
Copy CodeThe code is as follows:
function Encode_pass ($tex, $key, $type = "encode", $expiry =0) {
$CHRARR =array (' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' g ', ' h ', ' I ', ' j ', ' K ', ' l ', ' m ', ' n ', ' o ', ' P ', ' Q ', ' R ', ' s ', '
Write a verification code class in PHP and encapsulate it.
class Name: validationcode.class.phpThe code is as follows:
Copy CodeThe code is as follows:
Class Validationcode {
Private $width;
Private $height;
Private $codeNum;
Private $image;
Nonsense not much to say on the code
Copy CodeThe code is as follows:
function Curlrequest ($url, $postfield, $referer = ", $cookie =") {
Http://www.jb51.net
$ip = rand (100, 244). '. '. RAND (100, 244). '. '. RAND (100, 244). '. '. RAND (100, 244);
When using PHP to write a page program, I often use the variable handler function to determine the PHP page trailing parameters of a variable value is empty, at the beginning I used to use the empty () function, but found some problems, so instead
Class Recursivefilefilteriterator extends Filteriterator {
The extension that satisfies the condition
Protected $ext = array (' jpg ', ' gif ');
/**
* Provide $path and generate the corresponding directory iterator
*/
Public function __construct
1. $ related parameters in bash
Copy CodeThe code is as follows:
$ A-Indicates the current file name
$*-Separates all parameters with a space, forming a string
$@-Separates all parameters with a space, forming a string combination. Unlike $*, "$*"
Xdebug configuration:
1. Installation xdebug slightly. There is a lot of information online.
key to write php.ini configuration[XDebug]
Copy CodeThe code is as follows:
zend_extension= "/usr/lib/php5/20090626+lfs/xdebug.so"
Xdebug.default_enable =
Because PHP's file system operation is a C-based function, it may handle Null characters in unexpected ways. The null character is used in the C language to identify the end of the string, and a complete string is from its beginning to meeting the
PHP substr () function can split the text, but to split the text if the inclusion of Chinese characters tend to encounter problems, you can use MB_SUBSTR ()/mb_strcut This function, Mb_substr ()/mb_strcut usage and substr () similar, Just in
Let's take a look at the following online test code:
Copy CodeThe code is as follows:
$a = 9.45*100;
Var_dump ($a);
Var_dump (Intval ($a));
$a = 945*1.00;
Var_dump ($a);
Var_dump (Intval ($a));
?>
Run Result: float (945) int (944) float (945)
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