I am currently working on a project with php. Here I want to store the image into folder using move_uploaded_file
but when I use the following code :
if (move_uploaded_file($_FILES['file_promo_image']['tmp_name'], $uploadfile))
{
echo "Le fichier est valide, et a été téléchargé avec succès.\n";
}
I am getting the following error :
Warning: move_uploaded_file(http://www.desgensbien.com/sites/bestinfo/images/news/CodeCogsEqn.gif) [function.move-uploaded-file]: failed to open stream: HTTP wrapper does not support writeable connections. in /homez.534/desgensb/www/sites/bestinfo/admin/record-news.php on line 73
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpfCHv2s' to 'http://www.desgensbien.com/sites/bestinfo/images/news/CodeCogsEqn.gif' in /homez.534/desgensb/www/sites/bestinfo/admin/record-news.php on line 73
How can I resolve this issue
Use this:
$uploadfile = $_SERVER['DOCUMENT_ROOT'] . '/sites/bestinfo/images/news/CodeCogsEqn.gif';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With