php uploading a csv file into a mysql table
<p>I'm trying to create a script where a user can upload a csv file into a table.  I got the tutorial from <a href="http://www.shotdev.com/php/php-csv/php-upload-and-convert-import-csv-to-mysql/" rel="nofollow">shotdev.com</a>, I'm getting the following errors, what am I doing wrong?</p>

<p>*<strong>*The following command is not allowed: copy</strong> </p>

<p><strong>The following command is not allowed: fopen**</strong> </p>

<p>Page1.php</p>

<pre><code>&lt;form action="page2.php" method="post" enctype="multipart/form-data" name="form1"&gt;
      &lt;input name="fileCSV" type="file" id="fileCSV"&gt;
      &lt;input name="btnSubmit" type="submit" id="btnSubmit" value="Submit"&gt;
    &lt;/form&gt;
</code></pre>

<p>Page2.php</p>

<pre><code>&lt;?
    copy($_FILES["fileCSV"]["tmp_name"],"shotdev/".$_FILES["fileCSV"]["name"]); // Copy/Upload CSV

include 'datalogin.php';

    $objCSV = fopen("shotdev/".$_FILES["fileCSV"]["name"], "r");
    while (($objArr = fgetcsv($objCSV, 1000, ",")) !== FALSE) {
        $strSQL = "INSERT INTO customer ";
        $strSQL .="(CustomerID,Name,Email,CountryCode,Budget,Used) ";
        $strSQL .="VALUES ";
        $strSQL .="('".$objArr[0]."','".$objArr[1]."','".$objArr[2]."' ";
        $strSQL .=",'".$objArr[3]."','".$objArr[4]."','".$objArr[5]."') ";
        $objQuery = mysql_query($strSQL);
    }
    fclose($objCSV);

    echo "Import completed.";
?&gt;
</code></pre>
