Xinglin record (9)

Class member message book management: class/notebook/delnote. phpSession_start ();If (! Session_is_registered ("superlogin") // check for registration{Echo " log on to the administrator again. ";Exit;}Include ("../config. php ");If ($ del = 1) {//

An example of PHP + MSSQL Paging

Require "config. php ";Dl ("extensions/php_mssql70.dll ");If (! Isset ($ page) {$ page = 1 ;}If ($ page $ Db = mssql_connect ($ local, $ user, $ pass );Mssql_select_db ($ name, $ db );$ Query = mssql_query ("select count (*) as date from news", $ db

A high-ai paging function and a url Function

This paging function is very high.Let's see.Function ppage ($ total, $ page, $ e_page = 15, $ e_block = 10, $ url = '', $ color = ''){If (! Strpos ($ url ,'? '))$ Url. = '? ';Else$ Url. = '&';If ($ color <> ''){$ Color = ' ';$ Colore = ' ';}$

Php & amp; java (2)

Example 1: create and use your own JAVA classIt is very easy to create your own JAVA class. Create a new phptest. java file and place it in your java. class. path directory. The file content is as follows:Public class phptest {/*** A sample of a

Comparison of PHP4 reference file statements

Comparison of PHP4 reference file statementsLing xinyijianWhen programming, some things often need to be used repeatedly. If you enter them once every time, it is too inefficient. Therefore, in programming languages, statements that specifically

Analysis of global and $ GLOBALS [] in PHP

Use the previous example:PHP codeCopy codeThe Code is as follows:// Example 1Function test_global (){Global $ var1, $ var2;$ Var2 = & $ var1;}Function test_globals (){$ GLOBALS ['var3'] = & $ GLOBALS ['var1'];}$ Var1 = 5;$ Var2 = $ var3 =

PHP + Ajax asynchronous communication Implements user name email verification (two methods)

PrefaceThe Code is a little unfriendly, so according to the tradition of heaven and dynasty, the whole section is described .... (My language skills are limited for everyone to read)MeritIt is used when a Website user is registered. It is mainly

Common openPNE Methods

Copy codeThe Code is as follows: 'asdfgasgsad ');?> This statement contains '_ sidemenu. php' and transmits a series of parameters to its page. You can directly use the value in the $ form variable on the' _ sidemenu. php' page.Op_shortde_box ('vote

PHP extracts the image address from the string [regular expression]

Copy codeThe Code is as follows:$ Str = ' ';$ Pattern = "/ /";Preg_match_all ($ pattern, $ str, $ match );Print_r ($ match );?> Result:Array([0] => Array([0] => )[1] => Array([0] => upfiles/2009/07/1246430143_1.jpg))

Research and sharing of PHP asynchronous call Methods

In this case, a problem occurs. The corresponding server of a client may execute for 1 second or 1 minute, so that the browser will remain in the waiting state. If the program runs slowly, the user may be impatient to close the browser.Sometimes, we

Simple encapsulation of some functions of the mysql module in php

Copy codeThe Code is as follows:Class mysql{Private $ db; // datebase connectPrivate $ result; // mysql resultStatic private $ mysql; // mysql objectPrivate function _ construct (){// The work before Create an object$ This-> db = mysql_connect

PHP code used to determine whether the website is valid

Copy codeThe Code is as follows:$ Url = 'HTTP: // www.baidu.com ';$ Ch = curl_init ();$ Timeout = 10;Curl_setopt ($ ch, CURLOPT_URL, $ url );Curl_setopt ($ ch, CURLOPT_HEADER, 1 );Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );Curl_setopt ($ ch,

Php shopping cart implementation code

ShopCar. phpCopy codeThe Code is as follows:Class Shopcar{// Product listPublic $ productList = array ();/**** @ Param unknown_type $ the product to be imported* @ Return true no such item exists in the shopping cart*/Public function checkProduct ($

Php conversion between Chinese and English languages

At first, it was easy to create an XML document. I just saw that XML is not efficient.In addition, there are different templates, but there is also a small problem, some words such as the time prompt are not sure, and may be minute, day. It is also

Code used to determine whether the PHP array is empty

PHP preferred method for determining null array: count ($ arr), size ($ arr );Copy codeThe Code is as follows:$ Arr = array ("");Echo count ($ arr );Echo size ($ arr );// Output 1 Copy codeThe Code is as follows:$ Arr = array ();Echo count ($ arr

Code for obtaining flv video thumbnails and video time using Ffmpeg

Problem description; obtain the thumbnail and video duration of the flv video. Google found that Ffmpeg can be used to obtain video information for half a day. First, let's introduce FFMEPG. Here, I will briefly describe: FFmpeg is a complete

Simple Example of php method call mode and function call mode

An existing function and object are as follows:Copy codeThe Code is as follows:Var doubling = function (x ){Return x * 2;};Var obj = {Val: 100,}; In function call mode, this is bound to a global object. In this case, the object attributes and

Compatible with firefox and chrome webpage grayscale Effects

Technically, the most secure way to achieve gray-scale web pages is to directly process all images without considering compatibility or efficiency. However, it takes a lot of effort to switch back.The ie series supports css filters. filter: gray

PHP beginners often ask some questions. Update constantly

Last updated on: 17:50:10 Which tool do you use to write php code?A: ZEND Studio is generally used. I currently use PDT downloaded from eclipse.org, which is faster than Zend Studio 8. Although it is based on Eclipse,The lightweight tool is

Does not support fsockopen, but supports communication between ucenter and modoer in the culr Environment

Therefore, it is suspected that the encoding problem, the File Permission problem, or whether the function does not support the problem. After troubleshooting, it is found that the L1 host of hichina does not support fsockopen, which is in the file

Total Pages: 12780 1 .... 10249 10250 10251 10252 10253 .... 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.