example, the decimal is converted into binary.
PHP implements a binary conversion
function Dec2bin ($DEC) {
$flag = Array ();
while ($dec! = 0) {
Array_push ($flag, $dec%2);
$dec =
Determine whether the fields in the database correspond to the files in the folder, and if not, delete the files, which greatly reduces the use of system resources.
Created on 2010-4-24 made by Wolf QQ116311316
Function:
Eaccelerator configuration parameters: eaccelerator.shm_size= The number of shared memory (in megabytes) that can be used by the eaccelerator. "0" refers to the default value of the operating system. The default value is "0". can be adjusted
Example
Dco_get_district ("160149");
/*##################################
CONVERT POSTAL CODE to DISTRICT number and NAME
################################## */
function Dco_get_district ($postal) {
1, choose the most suitable design modeNothing is perfect, and no one has ever said design patterns a strict universal solution. So you can change these patterns to make them more suitable for the job at hand. For some design patterns, they are the
Use JS to get radio selected value, which is often used in the submission page, and also describes the method of not selecting and can get radio value.Example
Text
Example 1, the first letter of each word is converted to uppercase: Ucwords ()
$foo = ' Hello world! ';
$foo = Ucwords ($foo); Hello world!
$bar = ' HELLO world! ';
$bar = Ucwords ($bar); HELLO
$users = Array (
Array (' name ' = ' Tom ', ' age ' = 20)
, Array (' name ' = ' Anny ', ' age ' = 18)
, Array (' name ' = ' Jack ', ' age ' = 22)
);
Copy CodeI want to be able to sort by age from small to large.
This section: Php Curl Gets the return value of the implementation methodThere is a parameter Curlopt_returntransfer in curl:
curl_setopt ($ch, Curlopt_returntransfer, 0);
Copy CodeThe default is 0 to directly return the text
Although both empty and isset are variable-handling functions, they are used to determine whether variables have been configured, but they are somewhat different: empty also detects whether the variable is empty or zero. When the value of a variable
Download address (GITHUB.COM/MASTEREXPLODER/PHPTHUMB). Note that this class library has a name called Phpthumb, only the difference in capitalization, so be careful when looking for documents. Processing pictures in a number of places, with the PHP
# # $ARGV or $ARGC$ARGV contains an array of parameters that are passed to the current script when it is run on the command line. $ARGV [0] is the script file name.$ARGC contains the number of parameters that are passed to the current script when it
Recently, our company letter Easy network in the use of Yii to develop a project on their own temporary study of Yii learning to share with youThe YII framework is a high-performance PHP framework for developing large Web applications based on
PHP Gets the first letter function of Chinese pinyinTransfer from www.54dev.com
/** * @param unknown_type $str * @return 取得汉字的首字母 */function getfirstchar($str){ $fchar=$str[0]; //判断是否为字符串 if(ord($fchar)-->=ord ("A") && Ord
What the Seaslog currently offers
easily and canonical log logs in PHP projects
Configurable default log directory and module
Specify the log directory and get the current configuration
Seaslog's Goal
Everyone flat common most is the PHP connection MySQL class, today to share a PHP connection to SQL Server class. Interested friends can refer to the next.
Class Db_handle {
var $ClassName = "Db_handle";
var
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