Jump to content

clementwong

Members
  • Content count

    12
  • Joined

  • Last visited

Profile Information

  • Real Name
    LIANG BOON, WONG
  1. Hi Tony, thanks for the suggestion, I've tried change the $tempdir to several possibilities such as, "temp/"; "C/website/.../estore/catalog/temp/"; and the configure.php to define('DIR_FS_DOCUMENT_ROOT', '/var/www/html/estore/catalog/temp/'); define('DIR_FS_DOCUMENT_ROOT', 'c/website/.../estore/catalog/temp/'); define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); It won't work... Whenever I upload the file, it still shows the same thing - Temporary filename: C:\WINDOWS\TEMP\php113.tmp I tried to ftp the ep(.txt) file to the /catalog/temp/ folder and tried import the file to db through the third option in EP and nothing happens too. May I suggest that the following line has something to do with the failure of db uploading? if ($localfile or (is_uploaded_file($usrfl) && $split==0)) { //******************************* //******************************* // UPLOAD AND INSERT FILE //******************************* //******************************* if ($usrfl){ // move the file to where we can work with it $file = tep_get_uploaded_file('usrfl'); if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir); } echo "<p class=smallText>"; echo "File uploaded. <br>"; echo "Temporary filename: " . $usrfl . "<br>"; echo "User filename: " . $usrfl_name . "<br>"; echo "Size: " . $usrfl_size . "<br>"; // get the entire file into an array $readed = file(DIR_FS_DOCUMENT_ROOT . $tempdir . $usrfl_name); } if ($localfile){ // move the file to where we can work with it $file = tep_get_uploaded_file('usrfl'); $attribute_options_query = "select distinct products_options_id from " . TABLE_PRODUCTS_OPTIONS . " order by products_options_id"; $attribute_options_values = tep_db_query($attribute_options_query); $attribute_options_count = 1; //while ($attribute_options = tep_db_fetch_array($attribute_options_values)){ if (is_uploaded_file($file['tmp_name'])) { tep_copy_uploaded_file($file, DIR_FS_DOCUMENT_ROOT . $tempdir); } echo "<p class=smallText>"; echo "Filename: " . $localfile . "<br>"; // get the entire file into an array $readed = file(DIR_FS_DOCUMENT_ROOT . $tempdir . $localfile); } And may I ask any mysql expert out there to show us on how to get the ep(.txt) file updated in the db directly through phpmyadmin or the mysql db administrator? btw, I used PHP5 with MySQL 5.0.18, and Mysql Administrator 1.18 Million thanks, Clement
  2. Hi Jason, I got the same thing with you, only the temporary filename is different, I got File uploaded. Temporary filename: C:\WINDOWS\TEMP\php113.tmp User filename: EP2006Jun23-1301.txt Size: 1526903 I just wonder the problem that the database is not updated is caused by the temporary filename or the folder? maybe it should be uploaded into /catalog/temp instead, the problem is how to change the uploading folder to /catalog/temp ? Is there anybody out there know how to correct this? Clement
×