Uploading An Image To A MySQL Database Using A Blob

和自甴很熟 提交于 2019-11-29 17:54:43

You write:

$_imagePost = file_get_contents($_FILES['_imagePost']);

The correct syntax is:

$_imagePost = file_get_contents($_FILES['_imagePost']['tmp_name']);

$_FILES is an associative array whit following keys:

  • [name] => Original file name;
  • [type] => mimetype of uploaded file;
  • [tmp_name] => temporary filepath (where uploaded file is stored);
  • [error] => error;
  • [size] => size of uploaded file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!