Today, a buddy of mine asked me this question. He has an IIS server that is scheduled to execute a scanned PHP script, this How to do it every hour, the following is the settings of Windows
1 in Control Panel, double-click the Task Scheduler to
The JSONP output in PHP is generally in the following format:
Copy Code code as follows:
Callbackname (' JSON string ');
If the middle JSON string contains single quotes, the output is problematic and the caller is generally not
Google or Baidu, a lot of such problems, the solution is to modify php.ini, allow_url_fopen to enable, changed to Allow_url_fopen = On
This can solve some people's problems, it is said that in php.ini, there are two options: Allow_url_fopen =on
When it comes to dealing with times and times, it's important to introduce the calendar program. But when it comes to writing calendars, most people think that the calendar works just to show the current date on the page, but the calendar has a more
We design a verification code class Vcode through PHP's GD library image processing content. Declare the class in file vcode.class.php and encapsulate some implementation details into the class with object-oriented attributes. You can successfully
This article describes the PHP method for post data uploading based on curl. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
Two-dimensional code
$QRCode _url=
Before I wrote a simple example of PHP return JSON data, just surf the internet, suddenly found an article, also introduced JSON, quite detailed, it is worth reference. The contents are as follows
Starting with version 5.2, PHP native provides Json_
This article illustrates the implementation method of PHP custom hash function. Share to everyone for your reference. The specific analysis is as follows:
This demonstrates a simple hash algorithm implemented in PHP that can be used for encryption,
The example in this article describes the method for omitting the middle character of a PHP replacement string. Share to everyone for your reference. The specific analysis is as follows:
For a long string, if you only want the user to see a part of
A colleague today reflected that an error was reported when using curl to initiate an HTTPS request: "SSL certificate problem, verify that CA cert is OK." Details:error:14090086:ssl routines:SSL3_GET_SERVER_CERTIFICATE:certificate Verify Failed "
Recently found that PHP running automatically load class functions always timed out, tracking php slow query log, found that the program card in the Include a class file unexpectedly timeout.
Initial location is IO response Timeout, hard drive read
The configuration directives are as follows:
[Opcache]
zend_extension=opcache.so
opcache.enable_cli=1
shared memory size, which is adjustable according to your needs
opcache.memory_consumption=256 The
memory size of the interned string
1, add elements to the array
PHP is a weakly typed language. Therefore, you do not have to declare the length of the PHP array as the C language. The process of adding elements to them is also the process of declaring and initializing them.
For example, there are two memcached modules in Pecl, Memcache and memcached, and most PHP environments use a memcache version with no d in the name, which is released earlier and is a native version, The corresponding memcached version with D is
Idle eggs when the pain, by the way to strengthen their own PHP in the array manipulation of some skills, wrote the following a small code, you can randomly generate the number of card numbers corresponding to the array, and automatically to repeat,
Hprof is a PHP lightweight performance analysis tool for Facebook, which is similar to Xdebug, but has a lower performance cost, can be used in a production environment, and can be controlled by a program switch. Based on browsing
Performance
In this paper, we describe the method of random exchange of elements in the log group of PHP. Share to everyone for your reference. The specific analysis is as follows:
This is a custom PHP array element random swap function, PHP already has a
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