Php File-uploading doesn't work properly -


i manage download image c:\wamp\www\images\ . file's first letter deleted. don't know why happening. also, can't display image on webpage. can me out,please?

this php file displays info file , suppose display image doesn't.

<html><head><title>file uploads</title></head> <body bgcolor="#33ff33"> <font face="verdana" size="+1"> <?php    echo "the uploaded file is: ", $_files['picture_file']['tmp_name'], "<br />";    $filename=$_files['picture_file']['name'];    $filesize=$_files['picture_file']['size'];    echo "filename".$filename;    $directory='c:\wamp\www\images\\';    $uploadfile = $directory . $filename;    echo "the moved file is: $uploadfile<br />";    if (move_uploaded_file($_files['picture_file']['tmp_name'],    $uploadfile)){    echo "the file valid , uploaded.    <br /> ";    echo "the image file, $filename, $filesize bytes.<br     />"; }  ?>  <br/>   <img src=<?php     echo "\"c:\wamp\www\images\\$filename\""?>>  </font> </body> </html> 

this html form upload image

<html><head><title>uploading pictures</title></head> <body bgcolor="lavender"> <h3>uploading files</h3> <form  enctype="multipart/form-data"  action="upload_move_file.php"  method="post">  browse , select picture want upload: <br /> <input name="picture_file" type="file" /> <br /> <input type=submit value="get file"/> </form> </body> </html> 

if "www" document root image source "/images/$filename".


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -