[Code]php Code:
Header ("content-type:text/html; Charset=utf-8 ");
/**
* Converts a string into binary
* @param type $str
* @return Type
*/
function Strtobin ($STR) {
1. List each character
$arr = Preg_split ('/
2.unpack characters
Hide Apache and PHP version information, Web server avoids some unnecessary trouble, can put Apache and PHP version information does not show
Hide Apache Version Information
/etc/apache2/apache2.conf or/etc/httpd/conf/httpd.conf
Servertokens
PHP Bulk Get first letter (Chinese, Digital, English)
$mysql _server_name= ' 127.0.0.1 '; Change to your MySQL database server
$mysql _username= ' users '; Change to your MySQL database username
$mysql _password= ' password '; Change to your
There are several reasons why blank pages may be created in PHP programming:
1, logic error
logic error is the most difficult to exclude, on the surface, perhaps the code is legal, is formal, can be run but not expected. Why, then? Perhaps the
Method 1: According to the official manual, if the PHP tutorial's Safe Mode settings are too harsh, there is a scenario where the file does not exist, even if it is false.Because the server side of the php.ini we can not manipulate, when using
This article mainly introduces the PHP implementation of simple syntax highlighting functions, examples of PHP through regular expressions to achieve syntax highlighting of the relevant skills, the need for friends can refer to the
This article
how to format a phone number in PHP
The example in this article tells you how to format a phone number in PHP. Share to everyone for your reference. The specific analysis is as follows:
This function applies only to American phones, and Chinese
Share An example of PHP array ordering, introducing and PHP, related knowledge, skills, experience, and some PHP source code, etc. The code is as follows: $val)////loop outputs the sorted key value pair { echo "$key = $valn";//output key value
This article mainly introduces the introduction of access control and operator precedence in PHP, need friends can refer to the following
copy code code as follows:
class Foo
{
private $name = ' hdj ';
Public Function GetName () {
return
This article mainly introduces the PHP from the string creation function method, involves in the PHP string and the Create_function function use skill, needs the friend to be possible to refer to under
This example describes how PHP creates a
Php:bcmath
BC is the abbreviation of binary calculator. The arguments for the bc* function are the operands plus an optional [int scale], such as String Bcadd (String $left _operand, String $right _operand[, int $scale]), if scale does not provide ,
This article mainly introduces the increment and decrement of string in PHP, need friends can refer to the followingHere's a quote from the PHP manual today: "When dealing with the arithmetic of character variables, PHP follows the custom of Perl,
This article mainly introduces the PHP does not use the copy () function copy the file The method, involves the PHP reads and writes the file The skill, has certain reference value, the need friend may refer to under
The example in this article
This article mainly introduces PHP using unset () to delete a cell (key) in the array method, example analysis of the unset function in the deletion of the array unit of the use of skills, the need for friends can refer to the
This example
php after landing to jump to the front page, the use of $_server global variables can achieve this function, the following has a good example, I hope to help you. Recently hand a small project let me contact with PHP programming, simple landing
curl is an open source file Transfer tool that works with URL syntax at the command-line, and here's an example of how PHP uses curl to access HTTPS, and you can use it for reference. To facilitate the description, first code bar code as follows:
example, Analog landing
code as follows
/** * Simulate login * $url request Address * $post need post data * $cookie The co that was taken at the time of landing OKIE * $cookiejar cookie to be saved in the
1 PHP ~ bitwise operator
PHP: bitwise operator-http://www.php.net/manual/zh/language.operators.bitwise.php
Some time ago, a foreigner on Twitter burst a funny thing, a string of suspected garbled strings can be accessed after the normal output of 1
Let's take a look at two examples first.
Example: Php://input
The code is as follows
post.php
The code is as follows
? Echo file_get_contents ("Php://input");? >
have been using a Third-party mail system to send mail, such as QQ Ah, Gmail Ah, etc., but sometimes customers do not want to give us the sender's mailbox and password, then I found that the use of PHP with the mail function can fully achieve this
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