I am writing the following script up import a csv file into a mysql database. The user has to log in first and their security rights to upload are checked by another file, if this evaluates to true, the file can then be uploaded by the file up-loader which will only allow csv s to be uploaded and then the following part imports the file.
我在下文中采用正确的守则吗? 而且,如果真的放胎错,就有可能拒绝进口? 要求将这一特征作为这一项目的一项要求,因此,我只是试图使之成为可能的辅助证据。
<?php
$uploadedcsv = ./uploads/ .$filename. ;
$sql = LOAD DATA LOCAL INFILE " .$uploadedcsv. " INTO TABLE .$table. FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY """" IGNORE 1 LINES or die(mysql_error());
?>