Web Development Source code: PHP to generate static page class

Class HTML{var $dir; Dir for the htmls (without/)var $rootdir; Root of HTML files (without/): HTMLvar $name; HTML File Store pathvar $dirname; The specified folder namevar $url; Gets the source page address of the HTML file informationvar $time;

Read files in a directory in PHP

/* Purpose: Read a file under a directory * * The directory to read$folder = "H:/temp"; Open Directory$FP =opendir ($folder); Reading Table of Contentswhile (false!= $file =readdir ($fp)){List all files and remove '. ' and '.. 'if ($file!= '. ' &&

PHP version of the Verification Code program

Generate Captcha PictureHeader ("Content-type:image/png");Srand ((double) Microtime () *1000000);//sow a seed that generates random numbers to facilitate the use of the following random number generationSession_Start ()//to store random numbers in

PHP File Upload principle Analysis and upload class code

PHP Tutorial File Upload principle Analysis and upload class code Today, the study of PHP register post/get large variable, see some things about this piece, tracking for a long time, first recorded down, so that after the trouble of

Automatic file Rename implementation when PHP creates files

PHP tutorial creating files with automatic file Rename implementation function CreateFile ($filename, $content = ') { $fp = File_put_contents ($filename, $content); } The name of the file to create $filename = ' www.txt '; if

PHP common IP conversion and file download code

PHP Tutorial Common IP conversion and file download code IP conversionPHP to convert IP into an integral type of function ip2long () is prone to problems, in the case of large IP, it will become negative. $ip = "192.168.1.2"; $ip _n =

Short PHP read XML detail code

$doc = new DOMDocument ();$doc->load (' books.xml ');$books = $doc->getelementsbytagname ("book");foreach ($books as $book){$authors = $book->getelementsbytagname ("author");$author = $authors->item (0)->nodevalue;$publishers =

PHP generated Chinese Verification Code program

Today accidentally think of write verification code number plus Chinese characters, the following is the code easier to have nothing to say Let's take a look at the effect chart first. Isn't it good? Header ("Content-type:image/png");//type of

PHP Ajax Technology Implementation of file asynchronous upload

Asynchronous file uploads are frequently encountered and must be addressed in modern AJAX-enabled Web applications. But the standard Ajax class (XMLHttpRequest) does not implement the ability to transfer files. So what we're talking about here is

PHP's simplest example tutorial for generating XML documents

MySQL tutorial _connect (' localhost ', ' root ', ' 1****** ') or Die (' database server no exists! ');mysql_select_db (' wk ') or Die (' Database error! ');mysql_query ("SET NAMES ' GBK '");//set document CharSet encode function Createxml () {

How to deal with PHP garbage collection mechanism

First, the PHP garbage collection mechanism (garbage Collector abbreviation GC) In PHP, when no variable points to this object, the object becomes garbage. PHP will destroy it in memory; this is the GC garbage disposal mechanism in PHP to prevent

PHP using Zend Guard 6.0: Tutorial on encrypting PHP Files

Install cracked version of the Zend Guard 6.0 software, Bo Lord Jhonse brother tried to encrypt the PHP file. First step: Open Zend Guard 6.0 software Step Two: PHP file encryption 1. Create Zend Guard Project

PHP Extended Development Detailed notes

PHP kernel-written extensions have two ways to work (1). Compiled into dynamic shared objects/loadable modules, the common. So extension, which can be easily turned on or off in PHP's configuration file (2). Statically compiled into PHP, using

Smarty Template using PHP tags, how to get template variables

The code is as follows Copy Code {{PHP}}} for ($i =0; $i Echo ' ', ' cert '), ' pic_id ' =>$ assign[$i][pic_id]). ' title= ' > ', ' cert '), ' pic_id ' =>$ assign[$i][pic_id]). "Title=" ">". $assign [$i][title]. ' ', ' cert '),

Php string functions

Addslashes: Adds a slash to the string.Bin2hex: binary to hexadecimal.Chop: removes consecutive gaps.Chr: returns the character of the ordinal value.Chunk_split: splits a string into segments.Convert_cyr_string: convert the ancient Slavic string to

JS printing functions used in PHP

Auto = 1 PRINT immediately, otherwise PRINT after timeOut milliseconds, such as printPage );Function printPage ($ auto = 1, $ timeOut = 10000 ){If ($ auto = 1 ){Echo"N ";} Else {Echo"N ";} }

Php reloads new methods and class inheritance

Reload new methodsWhen learning PHP, you will find that methods in PHP cannot be reloaded. The so-called method reload means defining the same method name, you can access different methods with the same method name by using "different number of

Php three-object operator details

What do we often say about the simple three-object operator? : Operator The code is as follows:Copy code $ A = 1; $ B = 2; $ c = 3; $ d = 4;Echo $ a ?>

PHP object-oriented concepts and examples

Keywords and special variablesNew, class, extends. Everyone knows about these three items.:, The range resolution operator (also known as Paamayim Nekudotayim) or, more simply, a colon, can be used to access static members, methods, and constants.

Php object-oriented access control public, private, and protected

In PHP5, the object-oriented mechanism is enhanced, and access control mechanisms such as public, private, and protected are added. Literally:Public is undoubtedly the Public meaning, meaning that the class itself and its external subclass can

Total Pages: 12780 1 .... 4439 4440 4441 4442 4443 .... 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.