![]() |
Warning: fread(): supplied argument is not a valid stream resource
what did i do wrong here?
Code:
<?phpCode:
CREATE TABLE `tbl_upload` (Code:
;;;;;;;;;;;;;;;; |
It does not appear that you are checking if your fopen succeeded. Check $fp for a false and if it does return one, that could be your problem.
|
why do you think you made something wrong?
what is the problem? the file is uploaded? can you insert data in the db? |
Use file_get_content. by the way, its not $_FILE its $_FILES
|
thanks orc for that, i put it as $_FILES now
and when i upload it it looks like it worked. but i look in the table and nothing is there so now im confused to why it wont work. |
Quote:
Code:
|
i found the problem, for some reason when i took this line out
Code:
$filename = addslashes($filename); |
You should also use:
base64_encode() on the data before putting it in the database: PHP: base64_encode - Manual And when you want to take it out use: base64_decode() on the data. PHP: base64_decode - Manual Before you display it or download it or whatever. Good luck. |
| All times are GMT. The time now is 08:55 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0