PHP Learning--php Encryption, PHP learning--php encryption
There are several types of encryption in PHP:
1. MD5 Encryption
String MD5 (string $str [, bool $raw _output = false])
Parameters
STR--the original string.
Raw_output--If the optional raw_output is set to TRUE, then
PHP performance optimization Daquan (php. ini), performance optimization php. ini. PHP performance optimization (php. ini), performance optimization php. chapter 1 of ini is aimed at optimizing too many system calls. my optimizati
Configure requirements
Operating System: Windows7 (x32/x64), windows2008
IIS version:7.0
PHP Version:7.0.6 and above
MySQL version:5.7.12 and above
First step: Install IIS
Note : Starting with the IIS 7+php 5.5 version, the configuration of the PHP environment under Windows is completely different, faster and easier than the previous versi
This example describes the invocation method for PHP references. Share to everyone for your reference, as follows:
Example 1:
Example 2:
Examples 1 and 2 are the same effect.
Example 3:
Summary: The reference is returned only when the method is defined with the and the method in front of the method name plus when it is called.
Example 4:
When $ A and $b are not re-assigned, that is, when a write operation occurs, the
The example of this article for everyone to share the code of PHP generated verification codes, for your reference, the specific content as follows
The above is the whole content of this article, I hope that you learn PHP programming help.
The above describes the PHP generated cool four character verification code, including the verification Code,
The pool of PHP-FPMWhen a lot of PHP sites share a pool, if one of the sites affect the pool, will cause other sites also problems, in order to avoid this problem, need to create a new pool for each site, isolation, security services1, [[email protected] ~]# vim/usr/local/php-fpm/etc/php-fpm.confNew:[Test.com]Listen =/
Php embedded function usage instance, php embedded instance. Php embedded function usage example. php embedded instance this article describes php embedded function usage. Share it with you for your reference. The specific analysis is as follows:
Tags: php mysql database lampIssue background:Under normal conditions Lamp installation order is:linux-> apache-> mysql-> PHPPHP If you want to connect to MySQL at compile time need to use the MySQL header files and library files.PHP to connect Mysql need to use mysql.so extension in PHP engine, at this time, the first installation of PHP, when compiling
11.28 limit a directory to prevent PHP parsingThis section should be used to optimize settings for static file directories or writable directories, and to prevent malicious attacks by restricting resolution/access to improve security.To edit a virtual host configuration file:[Email protected] 111.com]# vim/usr/local/apache2.4/conf/extra/httpd-vhosts.confPhp_admin_flag engine offCreate the appropriate directory:[Email protected] 111.com]# mkdir upload.
Phpcli mode learning (PHP command line mode ). Php_cli mode description php-cli is short for phpCommandLineInterface, as it means, it is the interface for php to run on the command line, different from the php environment running on the Web server (
Introduction to php_cli mode
Php
In the CodeIgniter framework, what about URL (index. php. In the CodeIgniter framework, the codeigniter framework recently used CodeIgniter, a lightweight php framework, to build its own personal website. At first glance, the CodeIgniter framework looks like the URLs (index. php) in the codeigniter framework.
Recently, CodeIgniter, a lightweight
What is a CGI
The CGI full name is the "Public Gateway Interface" (Common Gateway Interface), a tool that HTTP servers "talk" to programs on your or other machines, and their programs must run on a network server.
CGI can be written in any language, as long as the language has standard input, output, and environment variables. such as PHP,PERL,TCL, etc.
What is fastcgi
FastCGI is like a resident (long-live) CGI, which can be executed all the time,
PHP programming considerations. 1. php implicit ternary operators (? :) Priority problem: Example 1: $ person $ whoor $ personlaruence; is actually equivalent to: $ personemptyempty ($ who )? Laruence: $ who; example 2 $ arr 1. hidden ternary operators in php (? :) Priority:
Example 1:
$ Person = $ who or $ person = "laruence ";
// It is actually equivalent:
Php extension php-redis installation and use, php extension php-redisI. redis Installation
1. Install the redis version.
Download Page: https://redis.io/download
Install an old version 3.2.11: http://download.redis.io/releases/redis-3.2.11.tar.gz
2. After wget is downloaded, decompress the package, cd to the decompress
Save the php code to the php file. For a lot of time, we need to save the php code generated by php to the php file. for example, if some basic data is used to cache, it will be directly saved to a specified php Cache file, we nee
One: the preparation stage
1:php
php-5.5.13 Download Link: http://windows.php.net/downloads/releases/php-5.5.13-Win32-VC11-x64.zip
It is recommended that thread safe (thread safety) V11 x64, which is 64bit.
Now PHP official online download PHP installation package has VC
Objective
The following is the implementation of the classic algorithm through PHP, and calculate the time-consuming, can be time-consuming comparison of the complexity of these algorithms.
Insert Sort
Bubble sort
Select sort
and sorted
Quick Sort
CODE
$arr= []; for($i=0;$i the;$i++) {$arr[] = rand (1,10000);}//1 Insert Sort functioninsertionsort($arr){ for($i=1;$i$arr);$i++) {$tmp=$arr[$i];//Set up a lookout$key=$i-1;//Set wher
reading, or 1, if it returns to the end of theparameter: char[] character array
while loop read, condition: If the length of the read is not -1
Combining strings
FileReader fr=New filereader ("test.txt"); Char [] buf=newchar[2]; int len=0; StringBuilder SB=new StringBuilder (); while ((Len=fr.read (BUF))!=-1) { sb.append (new String (buf,0, Len)); } System.out.println (Sb.tostring ());
PHP
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.