Php random output of famous saying functions
Function random_str (){
$ Poems = "The value of life is measured not by time, but by depth. -- Lev tolistes
For the threesome, you must have a teacher. From the
Class for viewing php code runtime
/**
* Function: view the php code running time
* Date: 2012-12-29
* File: show_php_runtime.php
**/
Class RunTime // page execution time class
{
Example of php bubble sorting and quick sorting
Function bubbingSort (array $ array)
{
For ($ I = 0, $ len = count ($ array)-1; $ I
{
For ($ j = $ len; $ j> $ I; -- $ j)
{
If ($
A class that tests the php program running time
Class runTime {
Private $ starTime; // start time
Private $ stopTime; // end time
Private function getMicTime (){
$ Mictime = microtime (); //
A php class that calculates the program running time
/**
* Computing program running time
* Filename: js_runtime.php
*/
Class Timer {
Private $ StartTime = 0; // The start time of the program.
Php-written class used to detect the user name of a mobile phone mailbox
/**
* Check mobile phone mailbox user name detection
*/
Class Check {
/**
* IsUsername function: checks whether
Php uses mysql_data_seek to move the pointer to the initial position of the dataset.
// Start snipit 1
$ SQL = "SELECT * from$ Result = mysql_query ($ SQL );
";
While ($ row =
In php5, the $ _ SERVER variable is no longer protected by magic_quotes_gpc.
$ Magic_quotes_gpc = get_magic_quotes_gpc ();
@ Extract (daddslashes ($ _ COOKIE ));
@ Extract (daddslashes ($ _ POST ));
Php code that randomly extracts some elements from the array
/**
* Random array element extraction
* Author: notuser
* 2012-12-29
*/
Class getValues {
Public function inputValue ($
Solution for CPU caused by mysqlrand () randomly recorded by the php program
$ Idlist = '';
For ($ I = 1; $ I
If ($ I = 1 ){
$ Idlist = mt_rand (3,25216 );
}
Else {
$ Idlist = $ idlist.
Php 301 redirection method
$ The_host = $ _ SERVER ['http _ host']; // mark the current domain name
$ Request_url = isset ($ _ SERVER ['request _ URI '])? $ _ SERVER ['request _ URI ']: ''; // judge the part
How php generates static html files
// Introduce the database configuration file
Include (dirname (_ FILE _). "\ include \ config. php ");
/**
*
* Generate a single HTML file from the
Refer to the php encryption and decryption processing class written by discuz passpor.
/*---------------------------------------
= Copyright agreement:
= GPL (The gnu general public license Version 2, June 1
Efficiency of random query records in RAND () in mysql and solutions
# Create a data table with a specified range
# Auther: Xiaoqiang
# Date: 2008-03-31
Create table randnumber
Select-1 as number
How to create a php paging display
// Establish a database connection
$ Link = mysql_connect ("localhost", "mysql_user", "mysql_passWord ")
Or die ("cocould not connect:". mysql_error ());
//
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