First of all, to edit the Nginx virtual host configuration, in front of the FASTCGI location statement, add the following content:
1, single directory remove PHP Execute permissions
Location ~/attachments/.*\. (PHP|PHP5)? $ {
Deny all;
}
Remove PHP
Set the "Add to Favorites, set Home" button on the site is the general site will do, but some sites have "put on the desktop" such as the function settings.
The following is a PHP implementation code that generates a shortcut and downloads it to the
1. Open a picture that already exists
The parameter of the function Imagecreatefromjpeg () is the path where the file is located, and the return value is the resource identifier of the picture that the parameter refers to. This function
Paste the record under the PHP query Express number of source code, can query a variety of express courier tracking Records, in-Pass, Yuantong Express, Shun Fung Express, etc. are not the problem. Only need to be in
Love Express (www.aikuaidi.cn)
Web-based music player demo Http://pan.baidu.com/s/1dDgm7HR
DIY a mobile phone-side online music player demo address http://shanxi2014.com/zhuandizhi/dom.php
Full support for mobile-side browsers.
Primary modification of Reference path (do not
The declaration of the PHP constructor is the same as the declaration of the other operation, except that its name must be __construct (). This is a change in PHP5, in the previous version, the name of the constructor must be the same as the class
Never written before recursion (in fact, think, the algorithm completely no concept), just have this demand, try to write a bit, found also quite easy, special record.
The database is dedecms default, Dede_arctype is the table to save the column,
First, the Phpmailer version used primarily by Ecmall is too low and does not support encrypted connections.
Then, you have to make some adjustments to the corresponding code.
1. Cover Phpmailer
Please download from the attachment:Copy the Code
Copy CodeThe code is as follows:
Iconv (' GBK ', ' utf-8//ignore ', ' home of the script '); Converts a string from GBK encoding to UTF-8 encoding
However, Iconv can only solve the pre-known encoding situation, if the string encoding is unknown,
The principle of Memche Message Queuing is to make a fuss over the key to do a sequential number plus the prefix to record the message or log after serialization. The content is then dropped to a file or database via a timed program.
The use of PHP
Implementation code:
Save the Verification code to the session for global use
Session_Start ();
$nums = "";
for ($i =0; $i Generate random numbers and convert to hexadecimal
$nums. =dechex (Mt_rand (0,15));
}
Write verification code to
When you write code today, you need to use the Json_decode function, and find that the previous version of php5.2 does not integrate this function, but we can do it through a custom function.
Copy the Code code as follows:function Json_decode2
There are more reliable and convenient encryption methods in the php5.5. A friend who likes to delve into the study:
Password_hash ()
http://www.php.net/manual/zh/function.password-hash.php
Two string encryption and decryption algorithms based on
first, how to set phpMyAdmin automatic login?
First, locate config.sample.inc.php in the root directory to copy a file name to config.inc.php (if a config.inc.php file already exists, modify the file directly).Open config.inc.php Find $cfg ['
definition and Usage:
get_meta_tags-extracts all meta tags from a file content property, returns an array
Grammar:
Copy the Code code as follows: Array get_meta_tags (string filename, int [use_include_path]);#打开 filename to parse the label in the
In our project, opening the slow log of PHP (Request_slowlog_timeout = 10s) is a must option, and it also allows us to find a lot of pits that solve a lot of performance problems.
Yesterday because of a very strange problem, let us have to close
share the method of filtering ASCII control characters in PHP.
The data from other crawled sites is directed to XML, the problem is that the Web page will have ASCII control characters.
At first I thought it was someone else who joined in order to
PHP One-dimensional arrays can be sorted by sort (), Asort (), Arsort () and other functions;
The ordering of PHP two-dimensional arrays needs to be customized.
The following function is to sort a given two-dimensional array according to the
The use of the upload class is very simple, if it is the first time to use the upload function of the friend should note that the HTML submission form of the form attributes to add the Enctype property, such as:
Copy the Code code as
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