Php prints the daffodils function code
Php daffodils function --bbs.it-home.org
Function winter ($ num)
{
If ($ num
// Define a single bit
$ Ge = $ num % 10;
Php character transcoding solves the problem of garbled data captured by Sina
Function unescape ($ str ){
$ Str = rawurldecode ($ str );
Preg_match_all ("/(? : % U. {4}) |. +/", $ str, $ r );
$ Ar = $
How to export xls files using php
Header ("content-type: application/vnd. ms-excel ");
Header ("content-disposition: attachment; filename=example.xls ");
// Note that the following head must be consistent
Phpisset () and unset () functions
$ Var = '';
// The result is true, so the subsequent text is printed.
If (isset ($ var )){
Print "this var is set so I will print .";
}
// In the following
Small example of php destructor
Function _ destruct (){
/* Class initialization code */
}
The Destructor is automatically called by the system and cannot contain parameters.Example:
Php Chinese character transcoding GBK-& amp; gt; Unicode (UTF8) encoding conversion
// Php Chinese character transcoding GBK-> Unicode (UTF8)
Class qswhGBK {
Var $ qswhData;
Function qswhGBK ($
PHPLinuxhtmlJS mobile game development MySQL and other tutorials online disk sharing
IT tutorial sharing ~! PHP/Linux/html/JS/mobile game development/MySQL/and other tutorials ~!Don't talk nonsense, go to resources:New Linux Video Tutorial:
Phpmysql escape special character functions
This article describes common functions used to program escape special characters in php mysql and how to implement escape characters in php. For more information, see.In php mysql programming,
Php code conversion function (iconvmb_convert_encoding)
Echo iconv ("ISO-8859-1", "UTF-8", "This is a test .");
?>
2. syntax of the mb_convert_encoding function:
/* Convert
Php string comparison and search methods
Var_dump (0 = 'test ');
Var_dump (0 = '');
Var_dump (5> 'T ');
Var_dump (strcmp (5, 'T '));
The result is (1st ~ 3. The result is incorrect. Only 4th of the
Php Server environment construction method
Loadmodule php5_module d: \ php5 \ php5apache2_2.dll
2. you can modify the documentroot parameter to modify the root directory of the server's main document. the original root
Two methods for setting php page encoding
Echo'
';
2. on the php page or html page
2. use the header function in the controller or page:
Header ("content-type:
Php function example for deleting string HTML tags
// Delete the html tag from the string
// By bbs.it-home.org
Function delete_htm ($ scr)
{
For ($ I = 0; $ I
{
If
PHP function strip_tags (html removal) bug
// Solve the strip_tags bug
Function fixtags ($ text ){
$ Text = htmlspecialchars ($ text );
$ Text = preg_replace ("/"/"," "\" ", $ text );
$ Tags =
Php-fpm configuration file details
This article describes some content about the php-fpm configuration file and configuration options. For more information, see.This section introduces php5.3 built-in php-fpm file, as follows:/usr/local/php/
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