1. Installing Apache
Copy the httpd-2.2.4.tar.gz to the/USR/LOCAL/SRC directory
TAR-ZXVF httpd-2.2.4.tar.gz
CD httpd-2.2.4
./configure--prefix=/usr/local/apache2--enable-so--enable-vhost-alias--enable-rewrite--enable-deflate-- Enable-mods-shared=
1. What is Phpdocumentor?
Phpdocumentor is a php-written tool for PHP programs with canonical annotations that can quickly generate API documentation with cross-referencing, indexing, and other functions. The old version is Phpdoc, starting from 1.3.
There are two ways to replace variables with strings--simple methods and complex methods.
The simple approach is to put the variable name in a double-quote string or Heredoc:
$who = ' Kilroy ';
$where = ' here ';
echo "$who was $where";
Kilroy is
1. Overview of methods
First of all, write a simple function, you can take a look at it:
HTML>Head> title>hellophp
title>
Head>Body>
php function Customprint($str) { for ($i=0; $i I+ +) { echo($str); Echo (''); }}
Copy CodeThe code is as follows:
Reading XML with DOM
$doc = new DOMDocument ();
$doc->load (' Test.xml ');
$books = $doc->getelementsbytagname ("book");
foreach ($books as $book) {
$authors = $book->getelementsbytagname ("author");
$author =
Now make a simple review: basically should encounter the problems are met, the key is to find more information, multi-brain can solve the problem.
1/Unable to load mcrypt extension, please check PHP configuration;
2/config file now requires top
Copy CodeThe code is as follows:
$path = $DOCUMENT _root;
$path =str_replace ("/", "\ \", $path);
Specify folder
$path = $path. " \\web\\study\\ ";
Get all the files
$s =explode ("\ n", Trim (' dir/b/o:gn $path '));
Get all the HTML file names
Copy CodeThe code is as follows:
/*
* Created on 2007-6-8
* Programmer:alan, Msn-haowubai@hotmail.com
* bkjia.com Develop a project Php-mysql-apache
* Window-preferences-phpeclipse-php-code Templates
*/
To avoid errors caused by repeating the
Hidden danger One: If the client machine's cookie is disabled by the virus, then the session will be the equivalent of No.
Hidden Danger Two: The session in PHP default is in the form of files stored in a temporary folder, for a small system, it is
Date--Formatting a local time/date
Gmdate--Formats a GMT/UTC date/time and returns Greenwich Mean Time (GMT).
For example, we are now in the time zone is +8, then the server run the following script to return the time should be this:
The current
Recognize and use PHP Super global variables
The super global variable, also known as a predefined variable, is a self-contained variable in the PHP system, which makes your programming easier and faster. The types of this
The principle is as follows, if:
Encryption
PlainText: 1010 1001
Key: 1110 0011
Ciphertext: 0100 1010
The ciphertext 0100 1010, the decryption of the need and key can be different or down
Decrypt
Ciphertext: 0100 1010
Key: 1110 0011
PlainText: 1010 1
First of all, in the literal sense, none-thread safe is non-thread-safe, do not thread security at execution time, thread safe is threaded, thread security is performed, to prevent new requirements to start a new thread of CGI The execution method
1. Resolving a scope problem
In the previous section, we talked about the scope of the function in PHP, and if the class is not enough to explain the problem, then the scope example in this article might be more convincing to you.
So how can we
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