Ladies and gentlemen, there is a problem, I have a data table, the data table has n multiple fields, I built a form in PHP, the type of the form has the text and file type, if the content is submitted to the database? and displays the submitted value in the page, how the file type displays the hyperlink address of the uploaded file in the page, that is, I can see the uploaded file when I click on the address. Thank you!
Reply to discussion (solution)
Like the address you uploaded was/upload/x.x.
Then your upload hyperlink address is http://localhost/upload/x.x.
That is your domain + upload path
Picture Word Gencun The address of the image after uploading it.
$upload _file=$_files[' upload_file ' [' tmp_name ']; $upload _file_name=$_files[' upload_file ' [' name ']; Copy the file to the specified directory if (!move_uploaded_file ($upload _file, "upload/". $upload _file_name)) { echo "failed to copy file"; Exit; }