1. Slicing
When there are manyCodeTime
We do not prevent slicing for debugging.
Add the echo '1'; echo '2' in different areas of the Code.
When running, you will know where the error occurred and where it was not running.
2. Anti-fish
Haha
PHP array RemovalRepeated itemsThere is a built-in FunctionArray_unique(), But the array_unique function of PHP is only applicable to one-dimensional arrays and does not apply to multi-dimensional arrays. The following providesTwo-dimensional
Although you only need to allocate 8 MBMemoryHowever, you may need to increase the number of modules used on your site.MemoryAllocate. When you access? Q = admin/moudlesAll modules on your site will be loaded, whether or not you enable them. If you
The following describes four common methods for using integer functions in PHP;
The integer function is often used. Let's make a summary today! Actually, it's quite simple, just a few functions ~~ Mainly: Ceil, floor, round, intval
This is a supplement to the upload of a single file, as long as it is to let everyone know that this is the caseI have not considered the security issues comprehensively. Please correct them. Thank you.
Single file
Index. php
When
The array needs to be transcoded. The original method is as follows:
Unserialize (iconv ('gbk', 'utf-8', serialize ($ array )));
The result is blank.
WithVar_export FunctionThe final function is as follows:
Function array_iconv ($ in_charset, $
1. php cookie
Cookie is a mechanism for storing data in a remote browser and tracking and identifying users.
PHP sends cookies in the HTTP header. Therefore, the setcookie () function must be called before other information is output to the browser,
Someone asked me in the forum how to count the number of online users? I don't know what is the best method. The following is the implementation principle of this site. I will write it for your reference. This is just my method. It is definitely not
With PHP, you can upload files to the server.Create a file upload form
It is very useful to allow users to upload files from forms.
See the following HTML form for uploading files:
Filename:
Pay attention to the following information about this
Many functions call external commands.
System ()
Passthru ()
Escapeshellcmd ()
Pcntl_exec ()
Exec ()
I cannot elaborate on their usage
However, sometimes this situation occurs.
When we add such a
1. the array values are different. If the values are null or ''or false, isset returns false, and array_key_exists returns true;
2. The execution efficiency is different. isset is a built-in operator, and array_key_exists is a PHP built-in function.
From: http://www.laruence.com/2010/04/15/1414.html
Ob_flush/flush descriptions in the manual are used to refresh the output buffer and must be used together, which may lead to many confusion...
In fact, they have different operation objects. In some
1. "+" OperatorRules:When the key names of two arrays are numeric or string key names$ C = $ A + $ BAppend the key name and value after $ A (the key name that $ B does not exist in $ ).Note:1. Do not overwrite, just append a key that does not exist
All PHP distributions, whether compiled from source code or pre-created versions, contain a PHP executable file by default. This executable file can be used to run the PHP program of the command line.To find this executable file on your system,
Code redirection is essential when you use Vim to view code. Generally, you can use ctags to generate tag files for VIM to read and redirect. However, the default settings of ctags are not very good for PHP support (mainly for function and property
Problems with configuring php development in Ubuntu 12.04
1. Install JDK
After the solution is completed, for example, the path is/home/XX/jdk1.7.0 _ 11.Introduce the following content into the/etc/profile example case:Note: Ingress inbound ~ /.
When phpMyAdmin is configured, the system prompts
"No PHP extension settings mbstring were found, and the current system seems to be using the wide character set. No mbstring
The extended phpMyAdmin does not correctly recognize strings and may
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