PHP is really easy to write. But PHP also has some very serious flaws. Below I will give my reasons why PHP is not suitable for larger sites than small amateur sites.
1. Bad support for recursion
Recursion is a mechanism by which a function calls
The following lines are commonly used:
Header ("content-type:text/html; Charset=utf-8 "); Specify PHP to use UTF-8 encoding$xml = simplexml_load_file ("Example.xml"); Reading an XML file$newxml = $xml->asxml (); Standardized $xml$fp = fopen
DAT files, information about IP-corresponding regions
Qqwry.dat file
Download yourself Online
class file, parsing the Qqwry.data file
iplocation.php File
Copy CodeThe code is as follows:
Class Iplocation {
/**
* @var Resource Hands
*/
Private
PHP File Upload source analysis (RFC1867) need to know the friend can refer to
HTTP-based uploads are relatively more user-friendly and security-enhancing than FTP. can be applied to upload methods have put, WEBDAV, and RFC1867 three kinds, this
Empty to determine whether a variable is "empty", isset to determine whether a variable has been set. It is this so-called "as the name implies", so I began to take some detours: when a variable value equals 0 o'clock, empty () will also be set
The MAGIC_QUOTES_GPC method is based on your php.ini configuration, if you open the MAGIC_QUOTES_GPC to generate, his role and addslashes is the same, let me give a detailed introduction about MAGIC_QUOTES_GPC usage.
Read the Thinksaas part of the
PHP read the contents of the file and write data to the file here is the main line of writing data to a file, also a line to read the contents of the file.
PHP Tutorials Read file content and write data to a fileHere is the main line of writing data
In the application
The PHP Get table field name is implemented by the Mysql_field_name () function, which has the following syntax format:
String Mysql_field_name (resource $result, int $field _offset)
The Mysql_field_name () function returns the
In practical programming, we usually use the STRTR () function when we want to implement the function of string substitution. Let's take a look at how the PHP string substitution is implemented.
V First look at the two states of this PHP string
Send timed text messages free of charge with PHP
Background: Mom is old, not high education, but need to know the weather information to work in the fields, you can not get the weather through the Internet, only through the TV. So I was thinking
What is the implementation of the PHP regular expression substitution? First introduce you to the PHP preg_replace,php Preg_replace use is our implementation of the method, then for the PHP regular expression substitution implementation process we
In learning
1. Launch API support for PHP
(1) First modify the configuration file of your php.ini.Look for the following statement:; Extension=php_mysqli.dllModify it to:Extension=php_mysqli.dll
(2) Restart the Apache/iis, you can.
(3) Description:
1) New remote host judgment, save server resources. Avoid the remote host does not exist when still fsockopen, resulting in the crash occupied the server CPU (2) added response 401 of the judgment and support. (3) Added support for JSON return text.
Gets the current file name, current directory, upper directory
File name test.phpPath + file name (to get/var/www/test/test.php)Echo __file__;File name (to get test.php)Echo basename (__file__);File name with no extension (to get test)Echo
PHP V5.2 adds hooks to developers to take advantage of the ability to track file uploads in real time. This article is part 5th of the "What's new in PHP V5.2" series (a total of five parts) and will show you how to monitor file uploads and write
This article describes various ways to debug a PHP application, including opening error reports in Apache and PHP, and finding the source of more difficult bugs by placing a strategic print statement in a simple PHP script. It also introduces the
Concept of scope:
Variables can be declared anywhere in the PHP script, but declaring the location of a variable greatly affects the scope of the access variable. This accessible scope is called scope.
The main commonly used include: local
In web development in order to provide user experience we mostly use Ajax to do some things, let me introduce an AJAX implementation of the non-refreshed page verification code AJAX verification of the needs of friends can be consulted.
Verification
In PHP empty () isset () Is_null () Three functions are to determine whether it is empty, but if I want to go into the specific depth of the three function found there are still a lot of differences, let me give you a summary.
Is_null (), Empty (),
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