Objective
This time to do is through the way of code, analog login seconds to shoot the official website, get the information of the logged-in user.
Separation of front and back
This article's title is curl, the traditional website is the PHP
This is the data URI scheme defined in RFC2397, the purpose is to embed some small data directly into the Web page, so that no longer load from the external file, such as the string of characters above, is actually a picture, these characters are
Bloggers have recently begun to learn about the various design patterns of PHP. In the beginning, of course, from some simple design patterns began to learn, such as the previously published factory model, today's simple mode, and then to see the
Cases
The code is as follows
Copy Code
$test = 0;if ($test = = ") {Echo ' in php, 0 is empty '; is output}if ($test = = = ") {Echo ' in php, 0 is empty '; Not to be output}if ($test ==null) {Echo ' in php, 0 is empty '
Once upon a time there was a fairly popular web chat room called the star Trekker chat room. I was able to come to this chat room to thank one of my friends, and even though star Trekker's chat friends were almost not in the same circle as me, I
The easiest way to filter links is to use the Strip_tags function of the PHP tutorial, as follows
PHP Filter HTML function: Strip_tags (string) so that you can filter out all the HTML tags.If you want to filter out all HTML tags except the , you
PHP Tutorial interface-oriented programming coupled design pattern
Understanding of interfaces. Interface from a deeper level of understanding, should be defined (norms, constraints) and implementation (the principle of separation of the
PHP Tutorial Regular Chinese multiple verification methods
gb2312 Chinese character alphanumeric underline regular expression
Preg_match ("/^[". Chr (0XA1). " -". Chr (0xff)." a-za-z0-9_]+$/", $STR);
Look at one more example of judgment
In PHP, there are two functions end () and current () that read the last element value of the array, which reads the first value of the array,So let's take a look at this. I also read the file 111cn.gif file suffix gif*/$file = ' www.111cn.net.gif ';
After PHP5, we can solve this problem by __autoload. And after PHP5.1, Spl_autoload_register () is also provided to provide a more complete loading mechanism.
By reading the autoloading in PHP article, I understand the autoload loading mechanism,
1. Concurrency issues
Concurrency we all know what is the case, here is a concurrent multiple requests to preempt the same resource, directly on the example bar
Request: Index.php?mod=a&action=b&taskid=6
Processing:
$key = "A_b::". $uid. ' _ '. $
Recently you need to run PHP on a apache+tomcat server, so you have to let Apache support PHP. In addition, the environment is now generally PHP will even MySQL and PostgreSQL, so the installation of the need to be MySQL and PostgreSQL functions
Generally, the simplest is to replace the character.For example, str_replace ("#", "-", "dizaz #7 # final "),More advanced is to save and replace the data.Str_replace (array ('#', '$'), "-", "dizaz #7 $ final"), etc,Other methods are the simplest in
The following describes the introduction and examples.Parse_url ($ str url );Convert a url into an arrayPrint_r (parse_url ("www.111cn.net"); // Parse the url and output the returned array/*Returns a string in special url format to a normal
1. Configure nginx1. Start the nginx service.The command is as follows:[Root @ VM_185_51/] # service nginx restart2. Test whether the nginx service is running normally.If 'index.html 'saved is displayed at the end, the nginx service is normal.[Root @
Number index array;Non-numeric index array;Array operator;Two-dimensional array and multi-dimensional array;Array sorting;Multi-dimensional array sorting;Sorts the array;Execute other array operations;Number index arrayLike the array in C #, you 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