In PHP, some useful functions open source is very convenient to prevent your site from all kinds of attacks, such as SQL injection attacks, XSS (Cross site scripting: Cross-site scripting) attacks. 1. mysql_real_escape_string ()
This function is
Author: zccst
If the PHP version is 5.2.x
If it is a lamp environment, then the PHP source file php-5.2.x.tar.gz decompression will have a php-5.2.x folder.
Under the php-5.2.x folder./configure--prefix=/opt/php5.2, make, made Intall,
The php5.2
Found an easter egg hidden in PHP. A Web page written in PHP, followed by a string "=phpe9568f36-d428-11d2-a769-00aa001acf42" as a parameter in the back of its URL, is presented with a photo of a puppy.
Depending on the version of PHP, the picture
What the beginner of PHP should pay attention to. Just do the development should be how to ensure that their code is not easy to complain, how to not let the test old to find the problem of old are approved. Come down and introduce the method.
Many
In PhP3, I contacted the PHP language, the first thing that attracted me is that it is free. It can run on a variety of operating systems, including Windows,linux,unix, and is open source. For me that loves open source, I soon like it. Although Java
Just in contact with PHP, you need to do a simple project.Project BackgroundSchool teachers more or less need to count the students of various materials, in addition to such as questionnaires, gold data such as the third party platform, the school
The first step:
//path: phpcms/modules/content/content.php
//Construction method public
function __construct () {
parent::__ Construct ();
$this->db = Pc_base::load_model (' Content_model ');//content Model database operation
1. INSERT statement: "INSERT into data table name (Field 1, Field 2,....) VALUES (" Value 1 "," Value 2 ",.....)"For example: $sql = "INSERT into message (title,content,who) VALUES (' Message title ', ' Message content ', ' message person ')";2.
A friend wants to build a website in PHP. The website address is www.hefeipet.com.
Select a CMS and which one? Is a problem.
At present, there are too many php cms files on the internet, domestic and foreign.
To open source
In PHP, $ _ env stores some system environment variables, which have different values due to different environments.However, sometimes $ _ env is empty for the following reasons:In PHP. the variables_order value in INI is "GPCs", that is, the system
Sometimes the warning and notice prompts in PHPProgramNot necessary. For example, return the obtained result to the XMLHTTPRequest object in text format. If PHP contains warning and notice, it will cause unnecessary trouble to the program, so
As we all know, when register_globals = on in PHP. ini, various variables are injected with code, such as request variables from HTML forms. In addition, PHP does not require initialization before using variables. This may cause insecurity. If
Isset () [1]
ReturnsTrueIfVaRExists and has value otherThanNull,FalseOtherwise.
The input can be multiple variables. Only when all the variables are true returns true.
Empty () [2]
ReturnsFalseIfVaRHas a non-emptyAnd non-zero value.
The
Next I will introduce all the magic methods in PHP. In fact, most of the following methods are familiar to a qualified PHP programmer. I will make a summary here, learn the records myself, and give an introduction to the students who are not
◆Compressed outputGzip
Using the mod_gzip module in Apache, we can use the gzip compression algorithm to compress the webpage content published by the Apache server and then transmit it to the browser of the client. If it is a plain text content,
SOA and PHP
What is SOA?
"SOA (Service-Oriented Architecture) is a new programming model for service-oriented architecture. It is called "next-generation software architecture ". SOA was proposed by Gartner in 1996. By December 2002, Gartner
First, let's take a look at the code of the uploaded form:
Code:
Type = "hidden" name = "max_file_size" value = "2000000"> file: Here are a few things to pay attention to. First, read this sentence ,Here we adopt the POST method, and some browsers
PHP is a server-side scripting language that is easy to learn and use. With little programming knowledge, you can use PHP to build a truly interactive web site. This tutorial does not want you to fully understand this language, but allows you to
When doing some Internet applications, you often need to capture most of the web files. In general, PHP is used to simulate browser access and access the URL address through HTTP requests, then we can get the HTML source code or other format data,
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