PHP4: Behind the Miracle
In 1995, Rasmus in PHP to write his personal homepage; today, PHP has become a global popular scripting language, more and more sites choose to use PHP, even Yahoo has given up its own script and switch to PHP to support its
Official address: http://www.arnot.info/eaccelerator/
Choose to download the eaccelerator that corresponds to your system and PHP version
2. Rename it to Eaccelerator.dll (win version) and move to the Ext folder in your PHP directory
3. Create
As a mid-level Phper rookie. Bored to love in the various PHP forums blindly turn. See a lot of PHP beginners have asked many of the same questions. And I have encountered it when I was learning PHP. Let PHP beginners take some detours. So suddenly
Automatically load objects:
Many developers write object-oriented applications that create a PHP source file for each class definition. A big annoyance is having to write a long list of included files at the beginning of each script (one file per
1, the connection MySQL database code
$connec =mysql_connect ("localhost", "root", "root") or Die ("Cannot connect to the database server:". mysql_error ());
mysql_select_db ("Liuyanben", $connec) or Die ("Cannot select Database:". mysql_error
What is a magic function?
The functions that begin with __ are named Magic Functions, which are triggered under certain conditions. For example: __set () __get (), etc.
triggered when setting or fetching properties that do not exist.
What are the
The definition of a variable
Type of ⚑ variable
Use of ⚑ variables
Variables are objects that exist in memory that can be constantly changed, we can think of memory as a street, there are many tenants in the street, each tenant will have their own
Use the $_post Super global variable to receive the data from the form, and then use echo to output to the page.
Here's the code:
using super global variable $_post receive form
"/>
name:
The output uses POST to submit the
PHP intercepts the Utf-8 format string
In PHP, we often need to intercept strings. The English character occupies a byte, the Chinese character occupies two bytes, but the Chinese character occupies two bytes is relative to the GBK encoding but in
The project needs to write a function that traverses all the files in the specified directory, and the subdirectories in that directory are traversed. Output The property information of the file and store it.
Think of the need, is not a ls-al
In the development of the project, it is unavoidable to create folders on the server, such as the directory when uploading pictures, the directory of template parsing. This does not apply to the current project, so it summarizes several ways to
PHP submits XML as post, obtains XML, and finally parses XML
Submit XML as Post
Do a POST
$data = "
1
2
";
$data = Array (' name ' => ' Dennis ', ' surname ' => ' Pallett ');
Create a new curl resource
$ch = Curl_init ();
Set URL and
This article describes the PHP implementation of blog, forum pictures anti-theft chain method. Share to everyone for your reference, specific as follows:
Anti-Theft chain of a lot of ways, I would like to say that I have to put hotlinking
This example describes the PHP cloud printing class. Share to everyone for your reference, specific as follows:
A project needs hundreds of computers have a printing function, is intended to use a network printer, and later found that there is no
One of the issues that we often need to consider when PHP is requesting an interface is the security of the data, which is likely to be intercepted using fillder such as a grab tool. A better solution is to encrypt the data to be requested before
This article is an example of how the PHP implementation converts HTML pages into Word and saves them. Share to everyone for your reference, specific as follows:
Here is a tool used to use a PHP called: Phpword.
The principle of generating word is
Change the configuration file to this
server {
listen;
server_name sub.domain.com;
Set $root _path '/srv/www/default ';
Root $root _path;
Index index.php index.html index.htm;
Try_files $uri $uri/@rewrite;
Location
Nginx 502 has many reasons, but most of the reasons can be attributed to the lack of resources, that is, the back-end php-fpm processing problems, nginx the correct client request to the backend PHP-FPM process, However, because of the PHP-FPM
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
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