Home > Backend Development > PHP Problem > iis5 cannot php $_post

iis5 cannot php $_post

WBOY
Release: 2023-05-07 09:45:07
Original
538 people have browsed it

IIS5 is a Web server software developed by Microsoft, and its latest version is IIS6. Although IIS5 is an older version of the web server, many people are still using it. Sometimes, you will encounter various problems when building a PHP website on IIS5. One of the problems is that $_POST cannot be used to obtain POST data. This article will discuss this problem and provide a solution.

First, let’s take a brief look at $_POST. $_POST is one of the PHP superglobal variables, used to obtain variables submitted through HTTP POST. When the user submits the form, the variables in the form are submitted to the web server through the POST method. The web server passes the POST data to the PHP interpreter, and the PHP interpreter stores the POST data in the $_POST array for developers to use.

However, on IIS5, the problem of $_POST not working properly is very common. This is due to the default settings of IIS5 not supporting the way PHP requests data. In order for $_POST to work properly, we need to do some configuration on IIS5.

The following is the solution:

  1. Modify the php.ini file
    Open IIS Manager and find the php.ini file. This file is usually located in the "C:\php" directory . Find the two parameters "post_max_size" and "upload_max_filesize" and set them to the required size respectively, such as 32M.
  2. Modify IIS5 configuration
    In IIS Manager, right-click the Web site and select Properties. Click on the "Home" tab, then find the "Application Settings" button and click on it. In the Application Settings dialog box, click the Add button. In the Add Property dialog box, enter the name "mappost", the value as "Yes", and click OK.
  3. Restart IIS5
    After completing the above operations, restart IIS5 and retest your PHP website. Now you should be able to get POST data using $_POST normally.

To sum up, to solve the problem that IIS5 cannot use $_POST, you need to modify the php.ini file, IIS5 configuration, and then restart IIS5. These steps may require some technical knowledge, but should not be too difficult for developers familiar with web servers and PHP. Finally, it should be noted that IIS5 is already an outdated web server software. It is recommended to use more advanced web servers as soon as possible, such as IIS6, IIS7, etc.

The above is the detailed content of iis5 cannot php $_post. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template