This tutorial is of the original load. for details, refer to content from the webpage tutorial network: we can use a program to display the current data. Pay attention to two points: 1. the following code must be put into the extended name. PHP file; 2. when running code on your server, this tutorial is of the original load.
Prefix:
We can use a program to display the current data.
Note: 1. you must put the following code in a file named. PHP. 2. when running code on your server, your server must support the MYSQL database.
The code is as follows:
Put the following code in the place where you want to display information.
// EDIT THIS
$ Server = 'localhost ';
$ Db_user = 'database username ';
$ Db_pass = 'database password ';
$ Database = 'database ';
$ Timeoutseconds = 300;
// STOP EDITING
$ Timestamp = time ();
$ Timeout = $ timestamp-$ timeoutseconds;
Mysql_connect ($ server, $ db_user, $ db_pass );
$ Insert = mysql_db_query ($ database, 'Insert INTO useronline VALUES
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