Import local excel files to online databases using php

Source: Internet
Author: User
Php import local excel to online database my program can import local excel to the local database, but it will not work if it is uploaded to the server ??? Do you want to upload the local excel file to the server and then import it ..... Only 22 points... Sorry ....


Reply to discussion (solution)

I don't know if you did the test... the last time you got to the server, where did you read the excel?

I am reading a local excel file. my file exceeds 2 MB. I have not uploaded more than 2 MB of files yet... Do you know how php uploads large files?

2 M is also called a big file. check the size of upload_max_filesize in the php. ini configuration file.

How does php upload large files? I changed php_value upload_max_filesize 10 M in php. ini.
Php_value post_max_size 10 M
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 );
Restart the instance.
Still not.

No, what does it mean? We recommend that you paste the error information for analysis.

I don't know what's going on. maybe you can export the SQL statement from the local database to the online database after importing the database locally. this is also a solution.

We recommend that you use navicat for mysql. This tool is very powerful and can fully meet your needs for importing excel files to the database. it is simple and convenient.

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

Ini_set ('upload _ max_filesize ', '10m ');
Ini_set ('post _ max_size ', '10m ');
It does not take effect, because the file has been passed over before the execution.

You should be in php. ini
Upload_max_filesize = 10 M
Post_max_size = 10 M
And restart the web service.

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

Ini_set ('upload _ max_filesize ', '10m ');
Ini_set ('post _ max_size ', '10m ');
It does not take effect, because the file has been passed over before the execution.

You should be in php. ini
Upload_max_filesize = 10 M
Post_max_size = 10 M
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.