Common functions in php collection programs: common functions in php collection programs? // Obtain the current script URL functionget_php_url () {if (! Empty ($ _ SERVER ["REQUEST_URI"]) {$ scriptName = $ _ SERVER [common functions in php
In PHP, magic_quotes_gpc and magic_quotes_runtime have different functions and usage. magic references are used to transmit $ _ GET, $ _ POST, $ _ COOKIE 1. condition: magic_quotes_gpc = off the character string written to the database without any
ThinkPHP obtains the functions of the previous article in ThinkPHP. you can refer to the method below and apply them to other websites with slight modifications. the method is the same! // Obtain the functions of the previous article in
The function in PHP to determine whether the directory is empty determines whether the directory is empty, true is empty, false is not empty functionis_empty_dir ($ fp) {$ H = @ opendir ($ fp ); $ I = 0; while ($ _ file = readdir ($ H) {$ I ++; PHP
The conversion function of the file size unit in PHP is to convert the file size unit to KB, MB, GB, and other functionRealSize ($ size) {if ($ size & lt; (1024) {return $ size. 'byte';} if ($ size & lt; conversion function of object Byte size unit
Static variables in php and java are static because static members are created when the class is loaded for the first time, therefore, static members can be accessed by class names without objects outside the class. static members are shared by
PhpExcel correctly reads the excel table and uses phpExcel to read the excel file. The Read TIME column contains 5 digits, not the desired time (I don't know why ), after searching an excelTime function on the Internet, you can correctly convert the
The question about the carriage return when php writes a text file is found today when writing a log file, the written content does not wrap. I checked some information to find some problems .? The related code is as follows :? File_put_contents ($ _
Php 5 learning record (2) I. reload performance 1. reload of attributes and methods php allows reload of attribute access and method calls by implementing special proxy methods, these proxy methods will be called when the relevant property or method
PHP commonly used sorting 1. get the website IP address gethostbyname ('domain name') through the domain name ');?? For example, gethostbyname ('www .baidu.com '); returns the IP address ip2long ('IP address ')? Convert an IP address to a long data
PHP performance optimization summary 0. use single quotes instead of double quotation marks to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, but not in single quotes. Note: Only echo
In php, the strtotime Method & nbsp; often needs to calculate the date. for example, to calculate the date one month ago, the fastest way is to use strtotime, the strtotime method is quite useful in echostrtotime ("now"), "\ n", and echost php.
In
Phpexcel provides many methods to read xls files. I am using the phpexcel class, and I am also wondering that the downloaded files are quite large, even if [img] [/img] is what netizens say, the size is 18 MB. let's see how phpexcel reads xls files.
Php processing check box checkboxphp is slightly different from asp in obtaining the checkbox value. He needs to name the name of the multiple selection box in the form into an array like php: name [], such as & lt; inputname = "area []" type =
Php common functions: How long does a user calculate when the data submitted is a Chinese/English-digit mixed-rank? /**? * UTF-8 encoding case *? * Calculate the length of a string *? * @ Param ?? String ????? $ Str ??????? String? *? * @ Retu
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