Home  >  Article  >  Backend Development  >  Android programmers learn PHP development (12)-Solution to form POST failure-PhpStorm

Android programmers learn PHP development (12)-Solution to form POST failure-PhpStorm

黄舟
黄舟Original
2017-03-02 10:09:141392browse

Why $_GET can get form data, but $_POST cannot? Because PhpStorm does not come with its own Apache server, so the print result of var_dump($_POST) is array(0).

My solution: Install to XAMPP, set the PhpStorm project directory to XAMPP, and set the port to the Apache port of XAMPP. Let’s take a look at the implementation process:

1. Install XAMPP.

https://www.apachefriends.org/zh_cn/index.html Download and install

2. Set the default port of Apache for XAMPP. I changed it to 8888:

Modify this file C:\xampp\apache\conf\httpd.conf

3. Create a project directory under XAMPP:

I created it like this: C:\xampp\htdocs\ myPhpDemo

4. Set the default port of PhpStorm, change it to the default port of Apache of XAMPP, 8888

Click File->Settings in turn and see below Screenshot:


5. Don’t forget to open the Apache server:

Open XAMPP first Apache server, then open PhpStorm~


6. No picture, no truth, here is a GIF to see the effect:



The above is the content of Android programmers learning PHP development (12)-Form POST failure solution-PhpStorm. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
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