Forum imitating OSO (3)

Post. php (publish new posts) problem If (! $ Cookie_user){Echo " ";}Else {include ("connect. inc. php ");$ Query = "select * from my_user where user = '". $ cookie_user. "' and password = '". $ cookie_password ."'";$ Res = mysql_query ($ query );

PHP + APACHE Implementation of user arguments

On a professional Web platform, the user's account and password are often required, that is, the Identity confirmation action. The early NCSA httpd server did not provide this user validation function. The Webmaster can only create an identity

Use PHP and ACCESS to write chat rooms (7)

Chtcont. php3:The Code is as follows:$ SCont = "";$ ConnID = @ odbc_connect ("jtfcht", "admin ","");If ($ ConnID ){If ($ id = "1" & $ ps = "superldz "){$ Result = @ odbc_exec ($ ConnID, "select top 25 sTime, sCont, sNameFrom, sNameTo, SeqID, sIPFrom

Source code of a simple counter

$ Memo_file = "phpcount/vst.txt ";If ($ phpxcount <> $ REMOTE_ADDR ){$ Visits = file ($ memo_file );$ Number_of_last_visit = $ visits [0];$ Number_of_new_visit = ++ $ number_of_last_visit;$ Fp = fopen ($ memo_file, "w ");$ Fw = fwrite ($ fp, $

Simple navigation bar program written in PHP

// A simple navigation bar program written in PHP// Navigation bar configuration Description: The default display is the directory name// If you do not want to use the directory name, remove the following line of comment and modify the array element.

Bbs Design Based on mysql (1)

1. System Architecture:The modular concept is divided into three layers:A. Data storage layer: mysql is used to store all bbs data, including user information,Article data, user mail, user message, system data (?), Key issues:Database Planning,

Three methods for querying mysql Data by using php

1. $ row = mysql_fetch_row ($ result );Returns a regular array $ row. $ row [0] is the first element, $ row [1] is the second element, and so on...The number of elements returned by mysql_num_fields ($ result.2. $ row = mysql_fetch_array ($ result );

Alternative Method for shielding browser cache

Sometimes we do not want the browser to use the cache to speed up the display of web pages, especially those that frequently update content such as forums. on the Internet, we can use the following methods to block the cache, but I tried it and it

Use PHP to write the stenographer (details)

PHP instance profiling: countersAuthor: Sucre_tigerThis counter uses text to count and does not use a database. The following functions can be implemented:Use a text file to count multiple pages to reduce the I/O usage of the server. In the file to

A simple counter written in php3

Php has extremely powerful image processing capabilities and can be used to dynamically generate web Images easily.Here is a simple counter made of php.1. Overall Thinking:Records the number of previous visitors in a text file. When a webpage is

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;

Check whether the PHP file contains bom functions.

Copy codeThe Code is as follows:/* Check and clear BOM */If (isset ($ _ GET ['dir']) {$ Basedir = $ _ GET ['dir'];} Else {$ Basedir = '.';}$ Auto = 1;Checkdir ($ basedir );Function checkdir ($ basedir ){If ($ dh = opendir ($ basedir )){While ($ file

Analysis of strange PHP reference efficiency

The function is as follows:Copy codeThe Code is as follows:Function update_timelist (& $ arr, $ timestamp, $ threshold ){$ Timequeue = & $ arr ['timequeue '];While (! Empty ($ timequeue [0]) & ($ timestamp-$ timequeue [0])> $ threshold ){Array_shift

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,

Summary of methods for optimizing PHP programs

1. If a method c ++ an be static, declare it static. Speed improvement is by a factor of 4. If a method can be static, make a static Declaration on it. The speed can be increased to 4 times.2. echo is faster than print. echo is faster than print.3.

Summary of N methods for getting file extensions in PHP

1st methods:Copy codeThe Code is as follows:Function get_extension ($ file){Substr (strrchr ($ file, '.'), 1 );} 2nd methods:Copy codeThe Code is as follows:Function get_extension ($ file){Return substr ($ file, strrpos ($ file, '.') + 1 );} 3rd

PHP code for comparison of mysql database differences

Of course, you can browse in PHPMYADMIN. But there are omissions after all. So I wrote a script for comparing database differences (for PHP. Of course, the code is very simple and I will not explain it. paste the Code:Copy codeThe Code is as follows:

Php background multi-user permission group ideas and implementation program code sharing

Adminconfig. php this is the permission configuration for all files in the background system.Fun. php this is a functional FunctionLeft. php website background loads the corresponding function menu based on the user login IDOp. php calls adminconfig.

Trying to clone an uncloneable object of class Imagic Solution

After windows is installed, the following message is displayed:Fatal error: Trying to clone an uncloneable object of class Imagick in C: \ www \ hx \ pai_to_png.php on line 17 This prompt is displayed when IIS and Apache are used. After multiple

Summary of Url production issues in the yii framework

Copy codeThe Code is as follows: Assume that the URL Manager configuration is set to the Path mode. Use the default yii Configuration:Copy codeThe Code is as follows:'Urlmanager' => array ('Urlformat' => 'path ','Rules' => array ('/' => '/view ','//'

Total Pages: 12780 1 .... 12739 12740 12741 12742 12743 .... 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.