1. you can use session_register to register global variables available throughout the session. For example, session_register ("name") registers a global variable $ name, which can be directly used on the PHP page, if you want to use $ name in a
Pear is the abbreviation of the PHP extension and application repository. It is a code repository for PHP extensions and applications. In short, pear is like CPAN (Comprehensive Perl archive network) to Perl in PHP.
PECL (PhP extension Community
Using sockets in PHPBy Andrew Walsh
Introduction
Sockets are a method in which PHP can connect to another server over the Internet and networks. the basic function to open a socket to a server is fsockopen (). you may be
1. What is pear? Pear is an official open-source PHP class library,
PHP extension and application repository. Pear indicates a pear in English. Pear compiles common functions in PHP program development into class libraries, covering page
Switch: 51cto
A large number of open source PHP (Open Source Code/open source) applications have changed the world and the Internet. The following is a summary of many types of open source PHP software, including databases, shopping, and blogs, for
I. single quotation marks and double quotation marks are used in PHP's data storage process. That is, when storing data in the database, you must note that single and double quotation marks are escaped;
Let's talk about several PHP functions:
1.
I. Several methods to prevent Injection
In fact, it turns out that we need to filter out some common keywords and conformances such:
Select, insert, update, delete, And, *, etc.
Example:
Function inject_check ($ SQL _str ){Return eregi ('select |
[Program Analysis]Initialize a memcache object:
$ Mem = new memcache;
Connect to our memcache server. The first parameter is the Server IP address or host name, and the second parameter is the open port of memcache:
$ Mem-> connect ("192.168.0.200",
PHP open-source Ajax framework
Jqpie This is an Ajax framework that is extended from jquery and combined with PHP. Supports XML, HTML, and JSON handler. Jqpie provides the following functions:Use the $. getjson method to simplify requests from PHP
Referencing is a wonderful thing. It's a bit like a pointer in C, but it's not the same! In PHP, the reference is onlyAnother name of the variable content. Let me illustrate a few examples (only the content of PhP4, in PhP5 ).I have not carefully
1. to upload a file, you must first configure it as needed in PHP. ini.
There are several important configuration sheets:
Option
Default Value
Description
Post_max_size
8 m
Controls the maximum size of post requests.
This essay is translated from various documents on the network (see the last reference), especially the speeches delivered by Ilia Alshanetsky at multiple PHP conferences, it mainly involves various techniques to improve PHP performance. For
Jpgraph is a graph framework software written in PHP (supported by the GD library). It has rich functions and is easy to call. However, the details of some charts need to be carefully investigated, I will share with you the problems and solutions I
Introduction:
PHP5 adds a new feature: Reflection. This function enables phper to reverse-engineer class, interface, function, method and extension. With PHP code, you can obtain all the information of an object and interact with it.What is
SQL injection attacks are the most common means for hackers to attack websites. If your site does not use strict user input tests, it is often vulnerable to SQL injection attacks. SQL injection attacks are usually implemented by submitting bad data
The basic idea of callback functions can be implemented by any program is the same. The implementation is slightly different. The following describes how to implement callback functions through java, php, and javaScript, speak nonsense, action!
Java
I. Definition and usage
The eval () function calculates the string according to the PHP code.
The string must be a valid PHP code and must end with a semicolon.
If the return statement is not called in the code string, NULL is returned. If a parsing
Test environment: Windows Server2003 + PHP5.3.5 _ TS + Apache2.2.19
Create 1.php and put it in the localhot root directory. The file content is as follows:
Set_error_handler (function (){
Echo 'error occurred ';
});
Set_exception_handler (function ()
RSS aggregators are especially suitable for applications built using standard AJAX engines. However, it is difficult to implement cross-origin AJAX requests for RSS feedback. In this article, I will show you how to use a simple PHP function to
It only takes one day, as long as you carefully read and learn .-
I hope you can understand this. This is just about how to get started and better understand PHP! You can also master basic PHP knowledge! The PHP language is profound and profound! It'
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