Php file read/write operations
// Note that it does not exist before 4.0.0-RC2! = Operator
If ($ handle = opendir ('/path/to/Files ')){
Echo "Directory handle: $ handle \ n ";
Echo "Files: \ n ";
How does wordpress support Image uploading?
This article describes how wordpress only supports image uploading. you can use a custom function to upload images. other files are not allowed to be uploaded. For more information, see.
Mysql_result () function of PHP
Mysql_result () function of PHP
Definition and usageThe value of a field in the returned result set returned by the mysql_result () function. If successful, the function returns the field value. If
Example of using google Map interface to develop applications in php
Function selected ($ param, $ value ){
If ($ param = $ value) print "SELECTED ";
}
# Collect any form data to control the display
Php paging principle and page jump instance
Select * from table limit 0, 10 // The first 10 records
Select * from table limit 10, 10 // 11th to 20 records
Select * from table limit 20, 10 // 21st to 30 records
Php verification code php non-preset image generation verification code
This article describes how to generate a verification code for a php non-preset image. you do not need to preset the verification code picture on the server. The image
Php Chinese character transcoding GBK to Big5 encoding conversion
// Php Chinese character transcoding
Class qswhBig5 {
Var $ qswhData;
Function qswhBig5 ($ filename = "qswhBig5.php "){
$ This->
Html special character filtering php class
[Code] class HtmlFilter {/*** filter special characters in a string * @ static * @ param $ content * @ return string */public static function filterSpacialHtmlChar ($ content) {if (empty ($ content)
Example of using CI to operate multiple databases
Function _ construct ()
{
Parent: :__ construct ();
$ This-> xx = $ this-> load-> database ('XX', TRUE );
$ This-> load->
Common php design modes: Factory mode and Singleton mode
/**
Example of Factory mode
@ Link http://bbs.it-home.org
*/
Abstract class Operation {
Abstract public function getValue ($ num1, $
Solution when the array element obtained by fgetcsv is a null string
// The uploaded CSV file, which is usually GBK encoded in Excel,
// While the source code is UTF-8, transcoding is required
Php time zone setting method summary
Function_exists (date_default_timezone_set); // at this point, he always returns 1. this function is used to determine whether the character here is a defined function name.
The problem of data packet loss transmitted by php big form using the post method
In the production environment, a huge form, including three images, hundreds of input boxes and nearly one thousand checkboxes, is intercepted when The
Php sets the index. php file to read-only
Function set_writeable ($ file_name)
{
If (@ chmod ($ file_name, 0555 ))
{
Echo "the read-only attribute of the index. php file has been modified ";
}
Questions about calling php built-in functions in smarty
Function SmartyLen ($ params ){
Extract ($ params );
$ Len = strlen ($ text );
$ Max = $ length;
For ($ I = 0; $ I
$ Chr = substr ($
Nine lines of code is too wasteful, and five lines of code are sufficient. you do not need to recursively format the tree of infinitely classified data.
We know that the infinite classification of many open-source software uses recursive
Use functions to delete and copy files. check whether magic reference is enabled.
The deletion and copying of files through functions has shown whether magic reference is enabled.
/**
I still have a hard time
*
Convert the string open_door to OpenDoor and convert abc_bcd_cde to AbcBcdCde.
Convert the string open_door to OpenDoor and convert abc_bcd_cde to AbcBcdCde.
[Html code]
Convert the string open_door to
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