Use PHP Arrays for unlimited classification, without databases or recursion.

CopyCode The Code is as follows: Class cat{Public $ data; Public Function _ construct (){@ Include "data. php ";$ This-> DATA = $ class;} Public Function createsortlevel ($ fatherlevel) { If (empty ($ fatherlevel )) { If (is_array ($ this->

A piece of anti-theft PHP code

$ Admin [defaurl url] = http://www.163.com/404.htm; // address returned by leeching $ Okaysites = array ("http://www.163.com/", "http://163.com"); // White List $ Admin [url_1] = http://www.163.com/download/; // download location 1 $ Admin [url_2]

Installation and configuration of Apache and PHP in Windows 9x/NT (2)

5. run Apache in Windows NT If you are running a Windows NT System, you may want to run Apache as a service process of the system. Click Start and selectProgram"," Apache Web Server "," insfall Apache as service ". In this way, you can manage

PHP installation tips: FAQs (1)

I, Q: I have installed the Apache module for Unix by step, but the source code of my PHP script is displayed in the browser, or the browser prompts me to save the file. Why? A: This is because the PHP module does not work properly. Check the

Use PHP and access to write chat rooms (3)

Cinput. php3 As follows: input 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 = $

Use PHP and access to write chat rooms (4)

Code As follows: $ Connid = @ odbc_connect ("jtfcht", "admin ",""); If ($ connid ){ @ Odbc_exec ($ connid, "delete * from room where (roomid not in (select distinct roomid from user) and roomid <> 1 "); $ Result = @ odbc_exec ($ connid, "select

Use PHP and access to write chat rooms (6)

Leave. php3: $ Connid = @ odbc_connect ("jtfcht", "admin ",""); If ($ connid ){ If (! ($ Id = "1" & $ PS = "superldz ")){ $ Result = @ odbc_exec ($ connid, "select username, password, roomid, sex from user where userid =". $ id ); If (@

PHP beginners (9)

Build a simple interaction website (5) 8. Voting System In many cases, we need to collect opinions from Internet users and netizens. For example, comparison between the new page and the old page, views on a specific event, and predictions on

A function in PHP that controls string output

// A function in PHP that controls the output of strings (in Chinese and English). The number of words displayed in each line avoids the impact of English. // $ STR string // $ Len the number of words displayed per line (Chinese Character × 2)

Use PHP to dynamically generate a virtual reality web page

I have been engaged in 3D animation many years ago. After learning PHP, I found that I can use PHP to dynamically generate the OpenGL document, which is a bit similar to the generator to dynamically generate flash. Due to the wide and profound

PHP and XML: Use the expat function (3)

PHP and XML: Use the expat function (3) How to use this class in a PHP script? It is actually very simple. Here is an example: First, the class definition needs to be included in the script. Require (class_dir. "Class. newsboy. php "); Then,

COM in PHP (winows only)

After searching for a long time, I finally found it for me! Haha... // I heard that PhP4 also supports Java/EJB. // This script is come from Zend. $ Word = new COM ("word. application") or die ("unable to instancate word "); Print "loaded word,

Global. php

/** * Automatically determines the PHP version and converts all environment variables to global variables. * * @ Author Avenger * @ Version $ Id 13:01:14 $ */ Function pmyoutput (& $ ){If (is_array ($ )){Array_walk ($ a, 'pmyoutput ');} Else {$ A =

View source files in source. php

/** * Show Source * * @ Author Avenger * @ Version $ Id 9:09:03 $ */ Require_once 'header. inc. php '; Tpl_load ('left. tpl '); // Check url valueIf (! Isset ($ _ GET ['file']) { $ Body = "No page URL specified ."; } Else { // Fix the security

A PHP calendar Program

// If ($ HTTP_GET_VARS [year] = "") { $ HTTP_GET_VARS [year] = date ("Y "); } If ($ HTTP_GET_VARS [month] = "") { $ HTTP_GET_VARS [month] = date ("n "); } $ Month = $ HTTP_GET_VARS [month]; $ Year = $ HTTP_GET_VARS [year]; // If ($ year { Echo

PHP development tutorial-object-oriented

PHP is the scripting language for weak variables. That is to say, you do not need to define them first, which is flexible. It can also give a lot of freedom, but for programs, freedom is not a good thing. This is because it brings a lot of trouble

Php Cache Technology Introduction

Cache refers to the temporary file exchange zone. The computer puts the most commonly used files out of the memory and puts them in the cache temporarily, just like moving tools and materials onto the workbench, in this way, it is more convenient to

Use PHP to query the domain name status whois class

Copy codeThe Code is as follows: Class SearchDomain { Var $ domain = ""; Function SetDomain ($ udomain) { $ This-> domain = $ udomain; } // // Obtain whois and analyze the domain name status // OK is not registered // Non-null expiration time //

Php and ajax experience

Ajax is an asynchronous callback method! It also works with transmission methods on the server side, such as GET or POST. What I am talking about here is that when xml or json data is transmitted, PHP differs from other server languages in that

Use PHP and ACCESS to write chat rooms (1)

INDEX. PHP The Code is as follows! Function delquot ($ sStr ){$ S = str_replace (chr (124), "", $ sStr );$ S = str_replace (chr (39), "", $ s );$ S = str_replace (chr (34), "", $ s );Return $ s;} If ($ cmdYes = "inbound "){$ SUserName =

Total Pages: 12780 1 .... 9252 9253 9254 9255 9256 .... 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.