1. Prevent jumping out of the web directory
First modify the httpd.conf, if you only allow your PHP script to operate in the Web directory, you can also modify the httpd.conf file limit php operation path. For example, if your web directory
1. The cookie data is stored on the client's browser and the session data is placed on the server.
2, the cookie is not very safe, others can be stored in the local cookie and cookie spoofing, considering that security should use the session.
3.
The focus is on the One_mail function. Use the Mail_mimedecode class to extract message headers and message bodies from messages.
Copy CodeThe code is as follows:
Header ("content-type:text/html; Charset=utf-8 ");
/*
* Record kid words and insert
Copy CodeThe code is as follows:
/*--------------------------------------------------
ip2address [Qqwry.dat]
--------------------------------------------------*/
Class IP {var $fh; IP database file handlevar $first; First Indexvar $last; Last
This article mainly introduces PHP to send the POST request of three methods, respectively, using curl, file_get_content, fsocket to achieve post submission data, the need for friends can refer to the following
The code is as follows: class request{
1, first you must generate two-dimensional code specific code as follows:
Copy CodeThe code is as follows:
Class qrcode{
public $w;
Public $h;
Public $s;
function __construct ($w 1, $h 1, $s 1) {
$this->w = $w 1;
$this->h = $h 1;
$this->s = $s
Write the program today, suddenly found a long time to write a long time to get the number of days of the function, the classic switch version, but to get the number of days last month, I just put the month-1, it was too sleepy, then saw a kind of
1. Implementation
Copy CodeThe code is as follows:
Yum Install php-mbstring
2. Modify PHP.ini (This step is very important, some lxadmin version can not be automatically modified)Copy the Code code as follows:Echo ' extension=mbstring.so ' >>/etc/
This article mainly introduces the PHP send mail example, and can send the message with attachments, please refer to the use of it
The emailclass.php code is as follows:
Subject = $subject; $this->addr_to = $to; $this->smtp_headers =
A previously written php form e-mail sender, which uses the following method to verify that the e-mail address format is correct:
Code to copy code as followsEregi ("^[_a-z0-9-]+ (. [ _a-z0-9-]+) *@[a-z0-9_-]+. [a-z0-9_-]+.* ", $email)
It was later
The string compression method provided by PHP has
1.gzcompress-compress a string
This function compress the given string using the ZLIB data format.
2.gzencode-create a gzip compressed string
This function returns a compressed version of the
PHP provides a number of string compression methods, below for everyone to compare the next PHP string compression method, interested friends can refer to the next
PHP provides a string compression method with 1.gzcompress-compress A string this
The build Excel of course uses phpexcel this kind of library, but it is too troublesome, for as long as simple generation is a bit unworthy
What is simple, import database data into Excel, this is simple
Here's a piece of code (code from the
Preg_match_all for global regular expression matching, this article mainly introduces the relevant information of the next preg_match_all, the need for friends can refer to the following
preg_match_all-the global regular expression matching
WEB 2.0 Programming Ideas: 16 rules
Original: Thinking in Web 2.0:sixteen Ways
Author: Dion Hinchcliffe
1. Before you begin, set a simple goal. Whether you're a creator or a user of a Web 2.0 app, make a clear idea of your goals. It's like "I need
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