I have done with following code but it was not coming... if (isset ( $_REQUEST ['s_image'] )) {
echo $_FILES ["file"] ["name"];
$file_path = "http://localhost/Onlineshopping/images/";
$file_path = $file_path . basename ( $_FILES ["file"] ["name"] );
echo "</br>";
echo $file_path;
echo "</br>";
if (move_uploaded_file ( $_FILES ['upload_file'] ['tmp_name'], $file_path )) {
echo "success";
} else {
echo "fail";
}
/* echo "entered";
$base = $_REQUEST ['s_image'];
//echo $base;
$binary = base64_decode ( $base );
header ( 'Content-Type: bitmap; charset=utf-8' );
$file = fopen ( 'uploaded_image.jpg', 'wb' );
fwrite ( $file, $binary );
fclose ( $file );
echo 'Image upload complete!!, Please check your php file directory……'; */
} ?>
0 comments:
Post a Comment