Yesterday in the library reading, see the "Computer newspaper" on an article titled "30-year-old is not the end of the programmer", (details can be seen in the "Computer Report" 2010 19th, G14 version of the digital Workplace article). The general
Wind up two ways, we can refer to the use of:
Copy the Code code as follows:#方式一$ch = Curl_init (' http://www.jb51.net ');curl_setopt ($ch, Curlopt_returntransfer, 1);Curl_exec ($ch);Echo Curl_getinfo ($ch, Curlinfo_http_code); 200Curl_close ($ch);
Recently, because the project needs to do some processing on the remote database on a regular basis, there is a need to make a plan for what the task looks like. After the effort, finally using PHP to achieve this task, the following share the
Starting with version 5.2, PHP native provides the Json_encode () and Json_decode () functions, which are used for encoding, which is used for decoding.
Json_encode ()
This function is primarily used to convert arrays and objects into JSON format.
$
Public functions in CodeIgniter cannot be appended and can be implemented by helper helpers.
Create a common_helper.php file, define the required public functions, and store them in the Application/helpers directory.
Configure the $autoload in
when developing a system using the PHP OO model, it is often customary to store the implementation of each class in a separate file, which makes it easy to reuse the classes and facilitate future maintenance. This is also one of the basic ideas of
Today's changes to the corporate system, or AJAX requests, but this time than the last simple. But when I met a very curious question, I thought it was an AJAX problem, and then I accessed it directly on the browser, which is the connection: https://
IIS version: IIS 8.5
Problem description
Build a test site, a total of 2 pages (index.php and 404.php), the default home is: index.php
When accessing index.php and 404.php, the IIS server responds properly, stating that there is no problem
When you write a website, you may encounter this situation, is to write a form, this form is used to add an article, we fart in the background to receive data, and then into the database. Now there's a problem. What do you do when you want to make
PHP gets search keyword issues
On the internet to find a piece of code to achieve search key words, test a key word can not take, is not this code invalid, or there is a bug?
Search Source keyword
function Get_keyword ($url, $kw _start)
{
$start
php when the Chinese string interception, will often use two functions iconv_substr and MB_SUBSTR, the two functions should be how to choose it? Refer to the examples described in this article to understand.
Example code, using the function substr
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,
Nothing to do, want to try to encrypt, so the use of their familiar PHP to write ...
Principle:
Convert the characters to ASCII, then convert the ASCII code, convert the result to characters, and encrypt it.
?
Realize:
Enter the characters you want
PHP Verification code picture cannot be output
File name global_func.php
function _code () {
Run the Verification Code
With the number of code
$_rnd_code=4;
for ($i =0; $i
$_nmsg.=dechex (Mt_rand (0, 15));
}
Save in session
$_session[' Code
Single picture upload is not complex, here involves a number of image upload and image format verification, to ensure that the upload must be a picture, to prevent uploading other files to the server.
The basic implementation algorithm is to use
Recently, a PHP project used to limit the logon time function, such as the user login system 60 minutes after the automatic exit without action, I searched the network collected the following methods are available for reference.
The first method is
This feature was raised at the time of Php5.0x and was later canceled and implemented in PHP6. And this time again "advance" to the PHP5.3 release, it can be seen that the developer of its attention and cautious attitude.
The description of the
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