PHP to create a file method There are many of our most commonly used is fopen,file_put_contents these two methods to create a file, the following I will give you a detailed introduction, there is a need to understand the students can refer
We now want to copy the content of other people's website with pictures to their own site, so I have to download the pictures of other people's web, and then save to the local, and then the content of the image to replace the address of our local,
A segment of the classic code can be used to obtain the user's real IP address, including can be intranet or external network, the need for friends can refer to.
The code is as follows
Copy Code
/*** Get the real IP address
I am here to provide an example of using PHP to manipulate the BLOB field to you, I hope to be helpful!
This example stores the image file uploaded by the user in the BLOB.
Suppose you have a table with the following structure:
CREATE TABLE PICTURES
This article introduces a practical function, if we use PHP substr to intercept characters in Chinese processing is very problematic, today I wrote a better Chinese and English character interception function, the need for friends can refer to.
We want to write the original article content page program, the principle is very simple, is in the editor when we insert page breaks in the editor, and then in the display we directly use explode pagination can be achieved, of course, there is more
This is the development of a simple shopping cart function of the PHP code, with a few files do not use the database to achieve the shopping cart to do if the user closed the browser, shopping cart products will be all lost oh, the need for friends
We are talking about the anti-theft chain code only focus on the PHP solution, of course, if you have server management rights or htaccess file operation I do not use the PHP anti-theft chain OH.
Let's take a look at the simplestThe following is the
An experienced friend may know that when using a library like QQIP, the IP address we find is a bunch of numbers, and let's show you how to implement a digital method for converting IP addresses.
The code is as follows
Copy Code
This article to the Friends introduce Magento correction from the homepage of the product page breadcrumb navigation implementation method, if the product is from the category product list into the Product Details page, the breadcrumb navigation
PHP to the text file paging function simple implementation,
PHP is simple to implement the paging function of text files
Paging
Php//Chinese character handlingfunctionM_SUBSTR ($str,$start,$length){ $str
This article is based on jquery Ajax to achieve data cross-domain calls, mainly using PHP to return JSON data in real time, so that the convenient implementation of Ajax cross-domain data calls.
jquery file I do not provide download here, you can go
The following is a complete user in the pre-registration AJAX authentication User name implementation code, as long as required to save the.
The following is a complete user in the pre-registration AJAX authentication User name implementation code,
PHP bulk operation of the table, such as the selection of all the anti-select Delete function, PHP Select all
Select All
Options
Sender
Message Name
Mail Collateral Information
Below is a PHP digital paging class code, has been encapsulated code, the need for friends can refer to use. The main principle of paging is to get the current page, and then judge how many records on a page divide, the total record, it is so simple.
PHP Tutorial implements URL static
PHP implements pseudo-static
Another is pseudo-static mode, that is, users and search engines see the. html suffix of the static page, but in fact it is a dynamic program, but in some way disguised.
There are two
Running an external program in PHP that only the root user can run is always an old problem, and it's hard to do it in a regular way. This is because PHP is generally a module of Apache, that is, PHP is part of Apache, and Apache, in addition to the
Used to use JS to the instance chat room or no refresh output, in fact, PHP can be implemented separately Oh, in PHP we use Flush () Ob_flush () can be.
Ob_end_clean (); Clear the output cache and close the cacheEcho Str_pad (', 256);//output
This article introduces a more useful article about PHP to do the station search and Highlight keywords, this many friends directly use Preg_replace to operate, this is correct oh, but I think with str_replace faster oh. As for the reasons, check
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