PHP File Upload problem

Source: Internet
Author: User
Made a simple file upload, but after running an error
Simplifies code and discovers problems when files are transferred to PHP data is not passed or not received later
The code is as follows:
    
 
      Title    

Time stamp:



upload.php

 
  ";p Rint_r ($_files), echo"
";

Final effect:


Reply to discussion (solution)

Check the temp file, upload the configuration, and look at the No

1, confirm php.ini in file_uploads = On
2, confirm php.ini in upload_max_filesize <= post_max_size <= memory_limit

Re-print_r ($_post);

1, confirm php.ini in file_uploads = On
2, confirm php.ini in upload_max_filesize <= post_max_size <= memory_limit

Re-print_r ($_post);



Also make sure the upload_max_filesize is large enough.

I have a small picture of the test.


1, confirm php.ini in file_uploads = On
2, confirm php.ini in upload_max_filesize <= post_max_size <= memory_limit

Re-print_r ($_post);



Also make sure the upload_max_filesize is large enough.




These 3 numbers are 32m,32m,128m, and the files I upload are small enough.

1, confirm php.ini in file_uploads = On
2, confirm php.ini in upload_max_filesize <= post_max_size <= memory_limit

Re-print_r ($_post);



The result of Print_r ($_post) is also an array ().

What server are you using? It's not going to be debugged in Phpstorm, is it?

What server are you using? It's not going to be debugged in Phpstorm, is it?


It's Phpstorm, the latest version of 2016.
Is it a problem?

What server are you using? It's not going to be debugged in Phpstorm, is it?


mamp+phpstorm,php version is 5.5.23

Right! New Phpstorm for piracy reasons, POST mode is not supported

Right! New Phpstorm for piracy reasons, POST mode is not supported



What am I supposed to do?
Swap with the old version?

You can debug with a formal Web server.

You can debug with a formal Web server.


What should I do?


You can debug with a formal Web server.


What should I do?


With a browser



You can debug with a formal Web server.


What should I do?


With a browser



I want to know exactly how to use the browser
In fact, Phpstorm finally opened with Firefox, is the address wrong? What should it be?

Install one of Apache, Nginx, IIS, and configure PHP support
or download the integrated environment Suite

Install one of Apache, Nginx, IIS, and configure PHP support
or download the integrated environment Suite


I installed Apache.
But not configured

Add in httpd.conf
Phpinidir "/AMP/PHP54"
LoadFile "/amp/php54/php5ts.dll"
LoadModule php5_module "/amp/php54/php5apache2_2.dll"
AddType application/x-httpd-php. php

Execute Modify path name

Add in httpd.conf
Phpinidir "/AMP/PHP54"
LoadFile "/amp/php54/php5ts.dll"
LoadModule php5_module "/amp/php54/php5apache2_2.dll"
AddType application/x-httpd-php. php

Execute Modify path name



Clear what is the path of each line?
Because my PHP version seems different, and the path is not the same.

The path to your actual file

Add in httpd.conf
Phpinidir "/AMP/PHP54"
LoadFile "/amp/php54/php5ts.dll"
LoadModule php5_module "/amp/php54/php5apache2_2.dll"
AddType application/x-httpd-php. php

Execute Modify path name



In other words, under the Apache folder, under the PHP folder, look for files http.conf
Then add the following code at the end
Phpinidir "/AMP/PHP54"
LoadFile "/amp/php54/php5ts.dll"
LoadModule php5_module "/amp/php54/php5apache2_2.dll"
AddType application/x-httpd-php. php

What is the address of the first line???
The second line is the address of the Loadfile+ file Php5ts.dll
The third line is the address of the LoadModule php5_module + file Php5apache2_2.dll
What's the line four???

Good trouble. Directly next Wamp are directly configured to use Google Chrome should be no problem

Good trouble. Directly next Wamp are directly configured to use Google Chrome should be no problem


But there's no editor in Wamp.


Good trouble. Directly next Wamp are directly configured to use Google Chrome should be no problem


But there's no editor in Wamp.

Editor??? I'm going to go to the next Zend studio, okay?

Does anyone know how to connect Phpstorm with Apache?
The last day, the knot tomorrow

  • Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.