Observer mode:
The Observer pattern defines a one-to-many dependency on an object, so that when an object changes state, all its dependents are notified and automatically updated!
In the Observer pattern, the status of the subject and the number
PHP Gets the method of the last element of the array. Use the PHP built-in function end ().
The end () function points the array's internal pointer to the last element and returns the value of the element, if successful. For example:
$args =array
Ajax garbled out of the reason nowBecause the XMLHTTP uses the Unicode code uploads the data, but the General page uses is gb2312, this causes the display page to produce garbled. And when the page is obtained when the XMLHTTP return is UTF-8
Where exactly does Q:php.ini put?
A: on Unix, the php.ini file defaults to/usr/local/lib, because the default storage path is/lib, However, you can use the--with-config-file-path parameter to modify the storage location of the php.ini at compile
Resolved a period of time before I contacted Dec Tru64 Unix i installed the Php+apache, you can use the mail function provided is always unable to send a letter, and then a function, it uses the pipeline under the Unix and PHP sock function to send
Usually we use Htmlspecialchars () to filter HTML, but the character of the HTML is escaped, the final display is the HTML source code.
Use Strip_tags () to get rid of HTML tags.
$str = ' href ';echo Htmlspecialchars ($STR);echo
With the return of jobs, IPad2 's release seems to be getting hotter on the mobile side of the development topic. Here's a list of some of the biggest competitors in iOS-the Android (Android) system detection method.
JavaScript Judgment method
Catalog files
|-framework Framework Core Library
|--base the underlying class library folder, which contains the CApplication (Application class, which is responsible for global user request processing, it manages the set of application components
The Array_merge () function merges two or more arrays into an array.
If the key name is duplicated, the key value of the key is the value of the last key name (preceded by the overlay). If the array is a numeric index, the key name is sequentially
One of the most important data types in PHP is an associative array, also known as a hash table, which is a very useful data structure.
In the program, we may encounter problems that need to be eliminated, and give the simplest model:
There is a
$str = ' AS.DA.EFG ';
Gets the file suffix name
//strrchr-The last occurrence of the specified character in the string
, Echo substr (STRRCHR ($str, "."), 1). " ";
Strrpos-calculates the position of the specified string
Workaround for PHP unserialize return False
PHP provides serialize (serialization) and Unserialize (deserialization) methods.
Using serialize serialization, you can then use unserialize deserialization to get the original data.
' Fdipzone ', '
When you create the MVC view of a YII application, you can directly construct the page view directly using the HTML language, and Yii also provides several help (helper) classes to simplify the view writing. For example, to create a text entry field,
With an example of the previous "Hello,world" and an introduction to the Yii Framework Web Application Foundation, you can begin by introducing a simple and relatively complete Web application-hangman (guessing word game), which is published with
Using PHP to create images is a fairly easy thing to do. As long as you install some Third-party library files and have some knowledge of geometry, you can use PHP to create and process images. PHP currently uses the GD library to process images.
The internet today, Ajax is not a strange word. Speaking of Ajax, you may immediately recall the XML that arose as a result of RSS. XML parsing, I am afraid, is no longer a problem, especially PHP5, the emergence of a large number of XML parsers,
Developing robust Code series in PHP is about solving real-world problems with large and medium applications. This series of articles focuses on the new features available in PHP4, focusing on a number of tips and tricks that make development work
We know that PHP provides a magic constant (magic constant) __file__, which points to the currently executing PHP script. However, PHP does not directly provide a constant for the directory in which the script resides. That is, if we want to get the
PHP session variable is to store the user's session information, or change the user's session settings. The session variable stores a single user's information, which can be used by all pages.
PHP Session Variable
When you run an application on
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