Implementing database Storage Picture issues
index.php file
PHP Code
inserting MySQL pictures
------Solution--------------------
Picture Markers
What is this URL? Is the address of the picture on the website?
So what are you outputting?
echo ""
$fet [path] is not the content of the picture?
------Solution--------------------
Database storage Path: Open a folder to save pictures
PHP code
!--? phpinclude ("conn.php"); $f = $HTTP _post_files[' File ']; $dest _dir= './abc ';//Set upload directory $extend =explode (".", $f [' name ']), $kuozhan =end ($extend);//Get file extension $dest = $dest _ Dir. '/'. Date ("Ymdhms"). '. '. $kuozhan;//file named Current time $r=move_uploaded_file ($f [' Tmp_name '], $dest), chmod ($dest, 0755);//Set the properties of the uploaded file if ($r) {$sql = " Insert into path (PATN) VALUES (' $dest '); $queryt =mysql_query ($sql); echo ""; } else {echo ""; } $sqlpic = "SELECT * from path ORDER BY id desc LIMIT 1";//Check out the latest record $query 2=mysql_query ($sqlpic); $result =mysql_fetch_array ($query 2); $picpath = $result [' Patn '];//the latest picture path?--">