The Authentication code is to prevent the machine from flooding to the website pollution and increase the server burden to appear. At present, large and small sites have verification code. Today, I implemented a simple authentication code class.
PHP output JSON and display the Chinese characters in JSON
In PHP, we often need to output the array JSON, only need to use the Json_encode function to deal with the array, but sometimes the array has Chinese, using the Json_encode function to be
(1) Add the following code before : (Get the content edited in Ewebeditor)
(2) The following code is to embed ewebeditor into the Web page:
Content:
"
Id= content in the "content" to be the same as the id=content in !
Non-mainstream configuration method for implementing Php&nginx server Configuration
This method is not the previous popular Apache plus Php_module way to run, I was using Nginx as a Web server to fastcgi the way to run PHP.
Linux Compile:
Nginx I
Instance 15 directory creation, deletion
Copy Code code as follows:
$dirfile = "folder";
$dirfile =iconv ("UTF-8", "GB2312", $dirfile);//transcoding, otherwise you will see the inside of Windows is garbled, but the program can
In other words, if you assign a string value to a variable var,var, it becomes a string. If you assign an integer value to Var, it becomes an integer.
Type casts in PHP are very similar to those in C: precede the variables to be converted with the
An endless stream of similar events can have a huge impact on users, because people tend to use the same passwords on different websites, and a "Bauku" is all the same.
A general solution.
1, the plaintext password to do one-way hash
page.php
Copy Code code as follows:
/**
* * General PHP Paging class. (Imitation Google style)
* * Just provide a total number of records and two parameters per page display. (Detailed use instructions are attached.)
* * without
In JavaScript, it's easy to tell if a string is Chinese. Like what:
Copy Code code as follows:
var str = "PHP programming";
if (/^[\u4e00-\u9fa5]+$/.test (str)) {
Alert ("The string is all in Chinese");
} else {
Alert ("This
smtp.php
Class SMTP
{
/* Public Variables * *
var $smtp _port;
var $time _out;
var $host _name;
var $log _file;
var $relay _host;
var $debug;
var $auth;
var $user;
var $pass;
* Private Variables * *var $sock;
* Constractor * *
function smtp ($relay _
You're going to laugh at me. "Downloading files" is worth saying so easily? Of course it's not as simple as imagination. For example, if you want the customer to fill out a form, you can download a file, your first idea must be "Redirect" method,
You can use the following functions to implement:
function Posttohost ($url, $data) {
$url = Parse_url ($url);
if (! $url) return "couldn ' t parse url";
if (!isset ($url [' Port ']) {$url [' port '] = "";}
if (!isset ($url [' query ']) {$url ['
Overview of a custom menu
Custom menus Help the public number to enrich the interface, allowing users to better and faster understand the function of the public number. When you open a custom menu, the public number screen looks like this:
The example of this article tells the PHP through curl to realize the timing task of the image capture function. Share to everyone for your reference, specific as follows:
below for you to introduce a PHP timing task through the curl image of the
We know that there are several PHP configurations:
1, the CGI load PHP environment, is usually IIS inside the configuration interpreter for Php.exe, early more common, currently use less.Characteristic is: stable, but the efficiency is too low.
2,
There are two sets of regular expression libraries in PHP that are similar in functionality, but have slightly different execution efficiencies:
A set is provided by the Pcre (Perl compatible Regular Expression) library. A function named after a
Send an email to the specified mailing address to,subject The topic, message is the content of the letter. Additional options additional_headers can be omitted to indicate the header of other mail documents
BOOL Mail (string to,string
About PHP page output when JS set the check value of the input box is as follows:
/* Set the value of the form
/function SetValue (name, value) {
var-name.substr (0, 1),
input, i = 0,
val;
if (value = = "") return;
if ("#" = = I | | "." = = I {
This article describes the PHP version of micro-trust public platform for the implementation of the appointment to send email after the method. Share to everyone for your reference, specific as follows:
In fact, this kind of sending mail is very
This article describes the PHP version of micro-credit public Accounts third-party management tool development methods. Share to everyone for your reference, specific as follows:
The API that was recently provided on the micro-trust platform, and
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