Imitating OSO forums (4)

Reply. php (used to reply to a topic) problem If (! $ Cook_user){Echo " ";}Else {include ("connect. inc. php ");$ Query = "select * from my_user where user = '". $ cook_user. "' and password = '". $ cook_password ."'";$ Res = mysql_query ($ query

Database-based statistics on online users and daily visits

Online User count statistics, daily traffic statistics, and monthly traffic statistics are available .....$ SQL = "CREATE TABLE guestinfo (id integer DEFAULT '0' NOT NULL AUTO_INCREMENT,Ipaddress varchar (20 ),Host varchar (20 ),Cometime

Use PHP and ACCESS to write chat rooms (10)

Func. php3The Code is as follows:Function suiji ($ max){Srand (double) microtime () * 1000000 );$ X = rand ();$ Y = getrandmax ();$ R = $ x/$ y * ($ max-1 );$ R = round ($ r ++ );Return $ r;}Function StrOccurs ($ sStr, $ sFind ){$ STemp = $ sStr;$

Use PHP and ACCESS to write chat rooms (9)

Enterrm. php3The Code is as follows:$ ConnID = @ odbc_connect ("jtfcht", "admin ","");If ($ ConnID ){$ Result = @ odbc_exec ($ ConnID, "SELECT PassWord, LstTime, RoomID, RefRate FROM User WHERE UserID =". $ id );If (@ odbc_fetch_into ($ result, 0, &

PHP + DBM logging program (3)

6. log out of the logout. php3 file.Setcookie ("login", false, time () + 31536000 );Header ("location: login. php3 ");?>7. modify the information file modify. php3Require ("common. php3 ");$ Id = $ login;If ($ submit ){If ($ name = "") error ("enter

Challenge the source code of the best message book (4)

Config. php file// Your username and password, as well as the database name, and table name are defined here !!!// For fear that the user name and password will be viewed by others through the browser, the php extension will be used, so you will not

PHP script database functions (below)

Accelerate PHP database development with classesThere are many database access functions. improper use may reduce efficiency and even lead to errors. PHP itself is open and extensible, and many people develop the source code of various features for

PHP database call class call instance (detailed comment)

Copy codeThe Code is as follows:Require_once ("mssql. class. php ");// 1. Create a class and connect to the database$ Db = new mssql ("dns = aaa; uid = sa; pwd = sa; dbname = test ");// 2. Connect to the database$ Conn = $ db-> config ("dns = aaa;

PHP text article paging code by TAG or length (no database involved)

Instance code:Copy codeThe Code is as follows:/****************************************** ******************** Read Me* Article pagination** Paging mode: Paging by words, line feed, and special mark* In fact, the implementation idea is the same,

Php Data Structure and algorithm (PHP description) quick sort

Copy codeThe Code is as follows:/*** Quick sort***/Function sort_quick ($ arrData ){If (empty ($ arrData) |! Is_array ($ arrData) return false;$ Flag = $ arrData [0];$ Len = count ($ arrData)-1;If ($ len = 0) return $ arrData; // if only one data

Considerations for connecting PHP to SQLSERVER (dll file download)

Environment:-Apache 2.2.6-PHP 5.2.5-SQL Server 2005-Windows XP SP2Steps: 1. Configure PHP5 to connect to ms SQL Server as usual2. Download the correct version of ntwdblib. dll (2000.80.194.0). Note that this version number does not work for this

PHP sprintf () function application (Definition and usage)

Syntax sprintf(format,arg1,arg2,arg++) Parameters Description Format Required. Conversion format. Arg1 Required. Specifies the parameter inserted at the first % symbol in the format string. Arg2

Summary of common predefined variables in php

Copy codeThe Code is as follows:Echo "Current Operating System Information". PHP_ OS. " ";Echo 'file path and FILE name: '. _ FILE _.' ';Echo "current PHP version information". PHP_VERSION. " ";?> Common php pre-defined variables!The previous $ _

A black humorous Analysis of Timestamp obtained using mktime in PHP

The following code is a timestamp provided by most people on the Internet. At first glance, it can only be said that the current date is obtained, rather than the timestamp. Do not explain it more!Copy codeThe Code is as follows:$ Now = mktime (0, 0,

PHP obtains the timestamp of a certain time interval.

In the past two days, we need to implement the following functions:When a certain condition is reached, the server sends a text message to the user. The number of messages is multiple.Basic Idea: scheduled linux scanning. If a user meets the

Php multi-Keyword highlighted display implementation code

Project Structure: Start searching: Search for keywords here ("big" "this ") Search Results: highlighted Database structure required by the project: Implementation Code:Conn. phpCopy codeThe Code is as follows:$ Conn = @ mysql_connect ("localhost"

Describes some PHP functions used to determine variables.

Although this feature is very easy to program using PHP, it also has an important drawback: When you need to test the type of a variable, the language with loose processing types is confusing. Fortunately, PHP developers noticed this situation and

Introduction to observer pattern in PHP design pattern

IntroductionThe observer mode defines the one-to-many dependency of an object. In this way, when an object changes its status, all its dependent persons will receive notifications and update them automatically!Design principlesIn the observer mode,

PHP converts a string to an integer (int) intval () printf () for Performance Testing

Background and overviewAs early as a few years before SQL injection went viral, String Conversion into integers has been listed as a required operation for every web program. The web program forcibly converts the id and integer equivalent values

PHP vote system anti-vote judgment Process Analysis

Recently, I made a voting system for the entertainment portal, which is also overwhelmed by votes. All available methods are used. However, they are not ideal. Finally, I figured out the following method and made a flowchart to share with you.If you

Total Pages: 12780 1 .... 12334 12335 12336 12337 12338 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.