Today more busy, originally wanted to write more content, temporarily no way, pick a relatively simple components to write down, the next few chapters are introduced components.
Ltlogger use or relatively simple, the basic code is in the autoloader
The Objectutil component is actually the best example of a singleton pattern, when declaring calls to each component, using Objectutil, can effectively prevent the invocation of too many classes and result in errors or wasted resources.
such as
1. Set Cookies
PHP uses the Setcookie function to set cookies. It is important to note that a cookie is a part of the HTTP protocol header that is used to pass information between the browser and the server, so the cookie function must be called
Copy CodeThe code is as follows:
Echo Posix_getpid (); 8805
Sleep (10);
?>
Re-use
#ps-ax
This time if you open a browser request, you will find that Apache automatically added a few new processes
We find that the same process is not always
Spl_autoload_register(PHP 5 >= 5.1.2)
spl_autoload_register-Register __autoload () function
descriptionBOOL Spl_autoload_register ([callback $autoload _function])
Register the function in the SPL __autoload function stack. If the functions in the
First, download the address
Apache 5.4--httpd-2.4.4-win32.zip
PHP 5.4--php-5.4.15-win32-vc9-x86.zipNote that the PHP and Apache connector DLLs are already included in the VC9 thread-safe version, so you do not need to download this DLL.
Second, the
One of the previous PHP interview questions was this: do not use the third variable to implement the value of exchanging two variables. In general, the Third intermediate variable is used to realize the value exchange of the original two variables,
Understand that MySQL must firmly remember its architecture diagram, MySQL is composed of SQL interface, parser, optimizer, cache, storage engine
1 connectors refers to the interaction of SQL in different languages
2 Management serveices &
For more information, please see the zookeeper website.
Zookper: A collaborative service for distributed applications
Zookper is a distributed, open-source, collaborative service for distributed applications. It provides simple operations that
After installing Wamp, open the phpMyAdmin under it, which is the path http://localhost/phpmyadmin/
Appear
Look at the code in there, okay?
The workaround is directly mapped as follows:
Copy the Code code as follows:
Options Indexes
There are many global variables in the project process that require global storage, are they stored using global variables? That's a weak blow. Zend uses the registry mechanism (registry) to store objects and values, which is a container for storing
In the previous work did not pay attention to their own naming norms, now according to the hump name strict requirements for themselves:
The relevant definitions are as follows
Basic ConceptsCamel-like nomenclature (also called Hump nomenclature),
Session_unset ()Frees all $_session variables that are currently created in memory, but does not delete the session file and does not release the corresponding SessionID
Session_destroy ()
Delete the current user's session file and release SessionID,
PHP Code:
Copy CodeThe code is as follows:
Var_dump ($ARGV);
shell/Batch processing code
Copy CodeThe code is as follows:
@echo off
: BEGIN
set/p Input=any key to run or "C" exit:
If "%input%" = = "C" goto END
Goto RUN
: RUN
.. \bin\php.exe-
QuestionsI loop through the file_get_contents crawl a bunch of URLs, but always stop at the 100th URL, prompting me: "Warning:file_get_contents (URL) [function.file-get-
Contents]: Failed to open stream:http request failed! http/1.0 Read timed
boolClass_alias(String $original, String $alias [, bool $autoload = TRUE]-Creates an alias for a classboolclass_exists(String $class _name [, BOOL $autoload])-Check whether the class is definedStringGet_called_class(void)-Gets the class name of the
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