PHP import local Excel to online database

Source: Internet
Author: User
My program can import local Excel into the local database, but upload to the server is not??? To upload local Excel to the server and import it ..... Only 22 points ... I'm sorry....


Reply to discussion (solution)

The test does not know ... The last time you went to the server, you read the Excel there?

I read the local Excel, my files more than 2m, I have not resolved to upload more than 2m files ... Do you know how PHP uploads large files?

2M also called large files, you see the php.ini configuration file in the upload_max_filesize is how big

PHP How to upload large files Ah, I changed the php.ini in the Php_value upload_max_filesize 10M
Php_value post_max_size 10M
Php_value Max_input_time 300
Php_value Max_execution_time 300

Ini_set (' upload_max_filesize ', ' 10M ');
Ini_set (' post_max_size ', ' 10M ');
Ini_set (' Max_input_time ', 300);
Ini_set (' Max_execution_time ', 300);
and then reboot.
It's still not working.

What do you mean, no? It is recommended that error messages be posted for analysis.

I do not know what the problem is, you may be able to import the database locally after the local database export SQL and import the online database, is also a workaround

The recommended use of Navicat for MySQL, this tool is very powerful, fully meet your needs to import Excel to the database, but also simple and convenient.

Php_value upload_max_filesize = 10M
Php_value post_max_size = 10M
Effective only in. htaccess

Ini_set (' upload_max_filesize ', ' 10M ');
Ini_set (' post_max_size ', ' 10M ');
Will not take effect, because the file has been passed by the time it was executed.

You should be in php.ini.
Upload_max_filesize = 10M
Post_max_size = 10M
and restart the Web service

Php_value upload_max_filesize = 10M
Php_value post_max_size = 10M
Effective only in. htaccess

Ini_set (' upload_max_filesize ', ' 10M ');
Ini_set (' post_max_size ', ' 10M ');
Will not take effect, because the file has been passed by the time it was executed.

You should be in php.ini.
Upload_max_filesize = 10M
Post_max_size = 10M
and restart the Web service



Thanks

  • 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.