Data size is limited in 1,get
We all know that many old-fashioned browsers have limited the number of strings in URLs to 255, although the current version of the browser does not have this egg-ache limit, but we do not guarantee that all users who
Several methods of implementing timed tasks in PHP
These days need to use PHP to write a timed crawl Web server application. Search on the Internet for a solution, found Oschina a question of the answer is wonderful
Several solutions are
Nginx upload parameter problem, need to pay special attention to client_max_body_size this parameter, otherwise it will interrupt the request in Nginx.
General PHP configuration for file upload parameters php.ini file is as follows:
File_uploads
Principle analysis of Single sign-on Ucenter
First, let's get to the next Ucenter login step
1, the user login discuz, through the logging.php file function Uc_user_login to post data verification, that is, username and password to verify.2. If the
PHP curl_multi_exec () crawl Web content concurrently
PHP is a single-threaded language, so in some way the rate is not as Java this multithreaded language, after all, the main aspect is not here. But PHP also has its own multithreading (in fact,
Apache and Nginx How to close the log
Apache and Nginx use a period of time after the log file will become very large. Close the Apache log apahce configuration file conf File open and add a # to the front of the log.
Error log:
Errorlog
PHP calls to the Python module
How do I invoke external programs in PHP?
Here are the steps to proceed:
Environment: Windows XP, php5.3, python2.6.6
1. Install Python (http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi)
2. Add the
The code is as follows:
Header (' content-type:text/html; Charset=utf-8 ');$online _log = "Count.dat"; Save the number of documents,$timeout = 30;//30 sec No move author, think drop line$entries = File ($online _log);$temp = Array ();for ($i =
Prototype mode of PHP design mode
"Prototype mode is actually the creation of another customizable object from one object and no need to know the details of any creation." ”
Let's take a look at the basic prototype pattern code.
_id = $id; }
There are two known time stamps. Determine if the timestamp is included in the Saturday Sunday.
/*** determine if there is a weekend in the time period. * @author * @version October 10, 2015 17:36:27* @param begin start Time * @param last end time
Use PHP to get the website's Google PR value.
Here's how:
function App_hash_url ($url) {$seed = "Mining PageRank is against GOOGLE's TERMS of SERVICE.";$result =0x01020345;for ($i =0; $i
<>$result ^=ord ($seed {$i%87}) ^ord ($url {$i});$result = (
We know that when using PHP Json_encode to deal with Chinese, Chinese will be encoded, become unreadable, similar to the "\u***" format, but also to a certain extent, increase the amount of data transferred.
Echo Json_encode ("Chinese"); Output: "\
PHP each and list usage, combined with instance form analysis of each and list functions of the use of skills, and examples of each combined with the list function to implement the array traversal skills
Specific as follows:
Usage of 1.each
Look at
RMB Digital to Chinese capital, is a more common demand, so here to share a function, also counted as a record, in case you will use later!
function Num2rmb ($num) {$c 1 = "0 One and three Woolu qi Ba Jiu"; $c 2 = "split-angle element pick Bai
In the development of PHP application process, sometimes need to get HTTPS Web content, the following method, you can refer to the next.
Direct use of file_get_contents, will error;
$url = (https://xxx.com "); File_get_contents ($url);
Error:
PHP determines the function of the information to visit the spider, the specific code is as follows:
function Get_naps_bot () {$useragent =strtolower ($_server[' http_user_agent ');if (Strpos ($useragent, ' Googlebot ')!==false) {Return '
For the day IP is not high or the number of concurrent is not a very large application, generally do not consider these! There is absolutely no problem with the normal file operation method. However, if the concurrency is high, when we read and
Today's PHP framework is endless, I am not an expert in this area, and even can not skillfully use one of them, so I do not recommend, and do not want to discuss what is a framework which does not count the framework. What I'm going to talk about
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