Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在mySQL中保存路径时将图像上载到目录_Php_Html_Mysql_Database_Image - Fatal编程技术网

Php 在mySQL中保存路径时将图像上载到目录

Php 在mySQL中保存路径时将图像上载到目录,php,html,mysql,database,image,Php,Html,Mysql,Database,Image,所以,我有一个任务,我需要让用户使用他们网站上的表单直接向开发者报告游戏中的bug。在这个表单上需要有各种信息,包括上传你遇到的错误照片的可能性。我在使用此功能时遇到了问题,因此如果有人愿意花一些时间查看我的代码,我将非常感激:) HTML: <html> <head> <title>Raporter Bugs</title> <link type="text/css" rel="stylesheet" href="stylesheet.cs

所以,我有一个任务,我需要让用户使用他们网站上的表单直接向开发者报告游戏中的bug。在这个表单上需要有各种信息,包括上传你遇到的错误照片的可能性。我在使用此功能时遇到了问题,因此如果有人愿意花一些时间查看我的代码,我将非常感激:)

HTML:

<html>
<head>
<title>Raporter Bugs</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
</head>
<body>
<div id="bug_report_table_div">
<div id="overskrift_bug">Raporter Feil</div>
<div id="bug_report_table">

<form action="insert.php" method="post">
<table>
<tr></tr>
<tr>
<td>Navn på spill</td>
<td><select name="spill">
<option value="Synapsis">Synapsis</option>
<option value="Profit">Profit</option>
<option value="Blobb">Blobb</option>
</select></td>
</tr><br>
<tr>
</tr>
<tr>
<td>Når fant feilen sted?  </td>
<td><input type="text" name="tidspunkt"/></td>
</tr>
<tr>
<td>Feil funnet av</td>
<td><input type="text" name="rapportør" /></td>
</tr>
<tr>
<td>Picture of the bug</td>
<td>
<input type="hidden" name="size" value="350000">
<input type="file" name="photo"> 
</td>
</tr>
<tr>
<td>Beskriv problemet</td>
<td><textarea rows="5" cols="35" name="beskrivelse"></textarea></td>
</tr>
<tr>
<td colspan="2"><div id="submit_button_bugs"><input type="submit"><div></td>
</tr>
</table>
</div>
</div>

谢谢,请在您的表格中提供帮助,您需要包括enctype以便将文件上载到系统

<form action="insert.php" method="post" enctype='multipart/form-data'>

因此,在php端,
$\u文件将向您提供有关上载文件的所有信息

更改

<form action="user_registration.php" method="post">


<form action="insert.php" method="post" enctype='multipart/form-data'>
<form action="user_registration.php" method="post">
<form action="user_registration.php" method="post"  enctype='multipart/form-data'>