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;
/* 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!= '. ' &&
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 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
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 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 =
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
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
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
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 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
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
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
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 ?>
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.
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
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