Data
?/*Name:toexcelAuthor:riyao Chenversion:0.0.1Date:2006-05-15License:gpl*/
/****************************************This class are to change data from query to Excel fileSQL FORMAT:SELECT c_id,c_title,c_subject from News_content WHERE c_parid=0
Basic Tutorials | tutorials | pagination | static
Very long articles when preparing to generate static pages, but the content is relatively long, ready to generate static in the form of pagination, how to achieve it?
Use PHP for example:$content is
?/************************************Name:listdirAuthor:riyao Chenversion:0.0.1Date:2006-05-16License:gpl
This class are to list all file & directory follow a directoryParameter: $strdir, which directory you want list; $del _url,the Manage URL,*****
Table of Contents Some people like to make up slashes such as $dir = DirName (__file__). '/';And some people too troublesome and code is not beautiful, directly with $dir = DirName (__file__);
This can be problematic when we want to include
Record, spare
$host = ' www.google.com '; To ping the address, can also be IP
$port = ' 80 '; The port to Ping
$num = 3;
function Microtime_float ()
{
List ($usec, $sec) = Explode ("", Microtime ());
Return ((float) $usec +
Refresh | page
refresh1.php New Refresh display: echo " ";Exit
Refresh.ihtml
When you need two refresh frames, you can write the code two times, except that the function does not have a duplicate name.
Visit | design | page
At night someone asked me about the Site page display, the right to judge the problem. So I have this article again.
In fact, there are many ways to achieve this.1, you can be in each page alone to judge the right, this is the
Prepare data:
Create a new database test
Execute the following statement (Create a new table Test:id, sex, name three fields)
CREATE TABLE ' Test ' (
' ID ' INT (4) Not NULL auto_increment PRIMARY KEY,
' Sex ' INT (1) Not NULL,
' Name ' VARCHAR '
The verification code is used
Strtolower ($str) to lowercase
Strtoupper capitalization
When you need to send a value to this also, you can use Ajax, and many other methods,
var url = "xxx.php";
var data={};
$.post{url, Data,function () {
if (
Program | Server server load is too heavy to affect the efficiency of the program is also very common, we need to test this. Here I take the current most common Apache server as an example.
The Apache server comes with a tool called AB (Apachebench)
1, replace i=i+1 with I+=1. It is more efficient to conform to the C + + habit.2. Use PHP internal function as much as possible. Write your own function before you need to consult the manual to see if there are related functions, otherwise thankless.
Generate HTML
If you want to generate a separate file for the HTML code generated by the PHP page, you can use the following code.$s _fname = "93e.php";$o _fname = "93e.htm";Ob_end_clean ();Ob_start ();Include ($s _fname);$length = Ob_get_length ();$
As a senior and professional Skinner personnel, I began to invest in the great Internet from the beginning to now accumulated a wealth of Skinner experience. I'm sure every web programmer will have a similar experience. In the Skinner process, it is
Roughly is not know how many levels of directory below the directory, also do not know how many files, the need to count the size of space, this can be used in albums/database occupancy/network u disk programs.
The general program idea is to use the
Now, almost every blog has its own RSS aggregation system, for RSS, the following small program, to achieve the synchronization with the blog call.
The following are the referenced contents:The file Test.xml contains an XML document
Must be added before use;Session_Start ();?>Consider that we have time to consider whether to write sessionif (Isset ($_post[' userid ')) {If you really agree to write:$_session[' userid ' = $ccdot
}else{Or return cannot be written to session}?>
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