A function that can convert Chinese characters to pinyin
$d =array (
Array ("A",-20319),
Array ("AI",-20317),
Array ("an",-20304),
Array ("Ang",-20295),
Array ("AO",-20292),
Array ("BA",-20283),
Error_reporting (E_all&~e_notice); In addition to e_notice other exceptions are triggered (the result of the E_all&~e_notice binary operation is that the value of the e_notice corresponding bit is set to 0) Try-catch cannot take effect within the
Example, PHP gets the Linux server status code.
function Get_used_status () {
$fp = Popen (' top-b-N 2 | grep-e "^ (cpu| mem| Tasks) "'," "R");//Get a moment of system CPU and memory usage
$rs = "";
while (!feof (
This is the package of my MVC framework Actioncontroller
/*
* Mst_library v3.1
* @autohr Janpoem
*/
if (!defined (' In_mst_core '))
Exit (' Mst_actioncontroller can\ ' t be include single! ');
The code comes from PHP design mode.
?
/**
* from the sixth chapter of PHP design mode: Decorator mode
*
* Decorator design mode is suitable for the following work situations: Demand changes are fast and small, and
Error_reporting in the use of PHP programming frequency, presumably everyone is very clear, this article introduces the usage of error_reporting, for everyone to learn the reference. If the parameter level is not specified, the current error levels
Common caching techniquesdata Cache : The data cache refers to the database query cache, each time access to the page, will first detect the corresponding cache data exists, if not exist, connect the database, get the data, and the query results are
Share the SQL anti-injection letter of the Discuz forum Number, good writing.
$magic _quotes_gpc = GET_MAGIC_QUOTES_GPC ();
@extract (Daddslashes ($_cookie));
@extract (Daddslashes ($_post));
@extract
To get the field information in PHP, you can use the following function : Mysql_fetch_field () Mysql_num_fields () Mysql_list_fields () mysql_field_flags () MySQL _field_len () Mysql_field_name () Mysql_field_type () mysql_field_table ()The
Serialize () and unserialize () are explained in the PHP Manual: Serialize-generates A storable representation of a valueserialize-produces a representation of a value that can be storedUnserialize-creates a PHP value from a stored
Database connection Operation class
Class MySQL
{
Private $_link;
Public function __construct ($dbhost, $dbuser, $dbpassword, $dbname, $charset = ' UTF8 ')
{
$this->_link =
Output Excel file header, you can replace user.csv with the file name you want
Header (' Content-type:application/vnd.ms-excel ');
Header (' content-disposition:attachment;filename= ' user.csv "');
Header (' cache-control:max-age=0 ');
/*
Capture intercept function, mainly used to analyze the collected content
Getcon-Remove HTML characters and remove spaces after interception
Getcon2-Simply intercept and return the intercepted content directly.
Parameters:
//-------------------------------------
File Description: File Upload processing class
File Author: Jesse Lee
//-------------------------------------
Class Upload {
var $dir; Attachment Storage Physical Directory
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