Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $image = $_POST['name'];
- $filename = 'media/'.$image;
- if(is_file($filename)){
- $html="<img width=200 height=200 src='{$filename}' />";
- $result=array('html'=>$html);
- }
- else{
- $html='No image found';
- $result=array('html'=>$html);
- }
- echo json_encode($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement