i'm trying to upload a file like to my server (to a directory on the webserver).
I tried to play around with the UploadToDir.php example but i can't get it to work.
When i try to upload a test .txt file i get the following php error:
- Code: Select all
[23-Mar-2015 11:11:35 Europe/Belgrade] PHP Notice: Undefined variable: valErrors in \php\AjaxTableEditor.php on line 3895
[23-Mar-2015 11:11:35 Europe/Belgrade] PHP Warning: unlink(uploads/first line
second line): Invalid argument in \UploadToDir.php on line 122
When i try to upload a .jpeg image i get the following error:
- Code: Select all
[23-Mar-2015 10:34:15 Europe/Belgrade] PHP Fatal error: Uncaught exception 'Exception' with message 'An error occurred in script \php\AjaxTableEditor.php on line 1530: <br /><br />There was an error executing the following query: <br />insert into emp_upload_dir set `first_name` = :first_name, `last_name` = :last_name, `email` = :email, `department` = :department, `file_name` = :file_name, `hire_date` = :hire_date<br /><br />PDO query params: first_name => 'asd', last_name => 'asdasd', email => 'asdasd', department => 'Accounting', file_name => 'ÿØÿà\0JFIF\0\0`\0`\0\0ÿá\0ZExif\0\0MM\0*\0\0\0\0\0\0\0\0\0\0\0J\0\0\0\0\0\0\0\0Q\0\0\0\0\0\0\0Q\0\0\0\0\0\0tQ\0\0\0\0\0\0t\0\0\0\0\0† \0\0±ÿÛ\0C\0 \n\n\r\n\n \rÿÛ\0CÿÀ\0\0\0\"\0ÿÄ\0\0\0\0\0\0\0\0\0\0\0 \nÿÄ\0µ\0\0\0}\0!1AQa\"q2‘¡#B±ÁRÑð$3br‚ \n\Z%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ in \Common.php on line 26
For me it looks like the the file name isn't the file's name but its content, which obviously fails.
Does anyone know how to fix this?
Greetings
Chris