This article is mainly on the cause of the PHP Program Vulnerability Analysis and prevention methods for a detailed introduction, the need for friends can come to the reference, I hope to help you. Misuse of include 1. Vulnerability reason:
Today a client website suddenly reported a bunch of error prompts, prompting the code as follows:
Warning:session_start () [Function.session-start]: Open (/VAR/LIB/PHP/SESSION/SESS_0DJ5OL1FP235A0SCU79S8C33T1, O_ RDWR) Failed:permission denied (+)
The object model has been completely rewritten since PHP 5 for better performance and more features. This is the biggest change since PHP 4. PHP 5 has a complete object model. New features in PHP 5 include access control, abstract classes and
PCRE
There are two different ways to use regular expressions in PHP: PCRE (Perl compatible notation, preg_*) function and POSIX (POSIX extended notation, ereg_*) functions. Luckily, the POSIX family function was deprecated from the PHP 5.3.0.
Introduction in PHP has several predefined interfaces, but also useful iteratoraggregate (aggregated aggregate iterator iterator) Iteratoraggregate extends traversable {Abstract public traversable getiterator (void)} This interface implements a
If you want to implement password protection on a per-script basis, you can create a basic authentication mechanism by combining the header () function with the $php_auth_user, $PHP _AUTH_PW global variable. Typically, the server-based
PHP can open a socket port on a remote or local host. This article is a small example of using a socket: even
Receive a Usenet newsgroup server, talk to the server, and download articles from newsgroups.
Open a socket in PHP
Use Fsockopen () to
apache| Tricks | Script to install PHP as Apache DSO
PHP is often used with Apache Web servers for Linux/unix platforms. When we install PHP in the Apache environment, you have three installation modes to choose from: Static module, dynamic module (
$_server[' php_self '] #当前正在执行脚本的文件名, associated with document root.$_server[' argv '] #传递给该脚本的参数.$_server[' argc '] #包含传递给程序的命令行参数的个数 (if run in command line mode).$_server[' Gateway_interface '] #服务器使用的 the version of the CGI specification. For
1, Sina microblogging open platform (Http://open.weibo.com/wiki/index.php/Quickstart)
What is open: Open platforms open to developers is the user relationship of each user, the developer is not to the traditional application of the face of a single
1.UNIX time StampPHPD processing of data, especially when the time type data in the database is formatted, it is necessary to convert the time type data into the UNIX timestamp processing. Data for time types in different database systems
cannot be
Strtotime can parse the date-time description of any English text into a Unix timestamp, we use the mktime () or date () format date time to get the specified timestamp to achieve the required DateTime.
implementation function : Gets the timestamp
PHP is a combination of programming languages and application servers. PHP is similar to other programming languages, using variables to store temporary values and using operators to process variables. The real value of PHP is that it is an
A Simple Method for PHP to use mysqli to operate MySQL databases, mysqlimysql
The mysqli extension of PHP provides all the functions of its first-line version. In addition, because MySQL is already a database server with complete features, it adds
Teach you how to print a PDF (simple application of fpdf ). The class used today is FPDF. the PHPClass of FPDF allows you to use pure PHP (more specifically, PDFlib is not required) to generate PDF files. It is displayed in PHPClass and accelerates
Php implements RFC-compatible email address verification
/*
Copyright 2009 Dominic Sayers
Dominic_sayers@hotmail.com)
Http://www.dominicsayers.com)
This source file is subject to the Common
Problem: The PHP manual contains the following content about overloading: & quot; overloading & quot; (overloading) provided by PHP means to dynamically & quot; Create & quot; class attributes and methods. We use magicmethods. For example, _ call ($
This article introduces four database query methods by combining text and text: Basic query, connection query, subquery, and regular expression query, for more information, see query data to obtain the required data from the database. Data query is
Learning notes for forwhile loop statements in php. This article introduces how to use basic loop statements in php, including for loop, while loop, and dowhile loop. This article is suitable for beginners of php. This article introduces how to use
NuSOAP builds a PHP-based SOAP service. Many organizations have adopted Apach and PHP as their Web application environments. Using PHP in the Webservices mode may seem difficult. But in fact, with NuSoap, you can
Many organizations have adopted
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.