Through learning to learn from the realization of friends to organize, the implementation of the PHP version of the micro-letter public platform to push the message, to share with you for your reference, the specific content as follows This method
The first step: first in the local write a landing page and a content page (log in to enter) bar. The code is roughly as follows:
The following is login.php, used for requesting login, passing parameters via post, and registering the session if the
WordPress defaults to "subscribers," "Contributors," "Author," "Edit," and "admin" five user roles, the permissions from low to high, but the default five roles may not be enough for us, then you can use the Add_role () function to create a role.
This article is an example of the PHP graphics operation Jpgraph Learning notes. Share to everyone for your reference, specific as follows:
First, jpgraph installation configuration
Download Jpgraph installation package
After decompression, place
For a large message queue, frequent serialization and deserialization of large databases can be costly. Here is a message queue I implemented with PHP, just to insert a data in the tail, the operation of the tail, do not operate the entire message
This example describes how the Substr_count () function in PHP obtains the number of substring occurrences. Share to everyone for your reference, specific as follows:
Substr_count () in PHP can be used to calculate the number of occurrences of a
This example describes how PHP uses the Strstr () function to get all the characters after the specified string. Share to everyone for your reference, specific as follows:
The Strstr () function of PHP searches for the first occurrence of a string
References in PHP mean that different names access the same variable content.
There is a difference between the pointers in the C language. The pointer in C language stores the address of the variable's contents in memory
references to variables
PHP processes a large amount of data, each processing a data return client to display the current state of the method.
Similar to dedecms generating static pages
Idea:
1. Client sends request2. Server-side accept request, start to count the
For example:
Class A {
Public $f 1 = ' xxxx ';
static public $f 2 = 100;
}
If you want to assign a variable to an object, you can only initialize it in the constructor, for example:
Class A {
Private $child;
Public Function __construct ()
Scale picture and cut picture code sharing with PHP
/** * Picture scaling function (can be set height fixed, width fixed or maximum width, support gif/jpg/png three types) * author:specs * * @param string $source _path source picture * @param
Wanted to do a random change of background image function, written in JavaScript, the program flow should be: Create a picture array-> randomly select one of the values in the array-> generate style and write the body tag.
But with JS do, have the
When a hacker invades a server, first of all, "casing", where the "casing", refers to the server running some of the details of services, such as: Version number, when the hacker knows the corresponding service version number, you can find the
Originally from php5.1.0 start, php.ini added date.timezone this option, by default is closed
That is, the time that is displayed (no matter what PHP command is used) is Greenwich Standard Time
And our Time (Beijing time) is bad for just 8 hours,
DOMDocument related content.
Property:
Attributes a list of properties for storage nodes (read-only)
ChildNodes List of child nodes for storage nodes (read-only)
DataType returns the data type of this node
Definition of a node given in a DTD or
But English does not usually have coding problems, only Chinese data will have this problem. For example, when you use Zend Studio or EditPlus to write the program, using the GBK code, if the data needs to enter the database, and the database code
This article introduces a new way of uploading pictures, using HTML5 filereader to read picture files, and then transfer data to the server and then use PHP to process. The implementation process is as follows (with the picture preview feature)
Copy Code code as follows:
Get the current script URL
function Get_php_url ()
{
if (!empty ($_server["Request_uri"]))
{
$scriptName = $_server["Request_uri"];
$nowurl = $scriptName;
}
Else
{
$scriptName = $_server["Php_self"];
if
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