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

黄舟
Release: 2023-03-06 10:00:01
Original
1346 people have browsed it

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)!


Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!