One PHP interview question-it is said that it was from a large company
$ Arr1 = array (
'0' => array ('fid' => 1, 'tid' => 1, 'name' => 'name1 '),
'1' => array ('fid' => 1, 'tid' => 2, 'name' => 'name2 '),
'2'
Php converts seconds to time (year, month, day, hour ...) Code
A function is written to convert events in seconds to time formats such as year, month, day, and hour. For more information, see.The code is as follows:
0, "days" => 0,
PHP Cookie does not refresh the implementation code that takes effect immediately
/**
* Do not refresh the cookie to take effect immediately
* Site http://bbs.it-home.org
*/
Cookie ("mycookie",
PHP method for outputting all variable constants of the current process
Echo'';$ B = array );$ Arr = get_defined_vars ();// Print $ BPrint_r ($ arr ["B"]);// Print all server variablesPrint_r ($ arr ["_ SERVER"]);
A php mysql operation class
// Database operations
Class db
{
// Save the data variable after SQL execution;
Var $ db;
// Read or set the current data location
Var $ position = 0;
Php code for extracting Zip files
/**********************
* @ File-path to zip file
* @ Destination-destination directory for unzipped files
*/
Function unzip_file ($ file, $ destination ){
//
Php mssql extension SQL query solution for Chinese field names
// Encoding conversion function
Function utf8togb ($ s ){
Return iconv ('utf-8', 'gbk // IGNORE ', $ s); // when the IGNORE parameter
Differences between daddslashes () and saddslashes () in php
// ---- Saddslashes
Function daddslashes ($ string, $ force = 0, $ strip = FALSE ){
// Whether to forcibly remove strings or arrays
//
Alternative application of phpmd5 encryption
// Iterative algorithm
Function md5_1_1 ($ data, $ times = 32)
{
// Use MD5 repeatedly
For ($ I = 0; $ I
$ Data = md5 ($ data );
}
Code for converting a php multi-dimensional array to a string or a multi-dimensional array to a one-dimensional array
/**
* @ Method multi-dimensional array to string
* @ Staticvar array $
. PHP method for generating static html files
. PHP method for generating static html files
1. The following is a template method!
$ Fp = fopen ("templets.html", "");
If ($ fp ){
$ Fup = fread ($
PHP: associates with arrays and deletes elements based on element values.
After some modifications and improvements
$ Array1 = array ("a" => "green", "red", "blue", "red ");
$ Array2 = array ("B" => "green ");
$
Example of the javascript Yang Hui triangle
The Yang Hui triangle is an indispensable tool for calculating the coefficients of the two-digit multiplication and square expansion. it is a triangle number table composed of numbers.The effect
: This article mainly introduces how to disable and configure iptables for firewall in centos7. For more information about PHP tutorials, see. I recently played nginx as an image server. after installing it on Sentos, I found that the virtual
: This article describes how to add text watermarks to php images. For more information about PHP tutorials, see. The php class library adds text watermarks to existing images. the code is not very complete. thank you for your advice! The code is as
: This article mainly introduces PHP extension development 01: The first extension. if you are interested in the PHP Tutorial, refer to it. Let's assume that the business scenario requires such an extension to provide a function named ccvita_string.
: This article mainly introduces the theme installation, plug-in installation, uninstall and update of zendstudio. if you are interested in PHP tutorials, refer to it. When I first came into contact with zend studio, I searched the Internet for how
: This article describes how to install ffmpeg's php extension in a 64-bit system. if you are interested in the PHP Tutorial, refer to it. 1: After receiving my previous blog, I installed it in a 32-bit win7 system.
2: I installed 64-bit win7 on
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