Heim >Backend-Entwicklung >PHP-Tutorial >Verwenden Sie PHP, um eine Demo der Benutzerregistrierung und -verwaltung durchzuführen (PHP implementiert das Hochladen einzelner Dateien und mehrerer Dateien).
In diesem Artikel wird hauptsächlich erläutert, wie eine PHP-Funktion zum Hochladen und Herunterladen von Dateien gekapselt wird, die für die Avatar-Upload-Funktion in dieser Demo verwendet werden kann. Außerdem wird erläutert, wie mehrere Dateien hochgeladen werden. Wenn Sie mit dem Hochladen von Dateien besonders vertraut sind, können Sie diesen Abschnitt überspringen.
Ich verwende immer noch die gleiche Schnittstelle wie zuvor.
addUser.php:
<code><span><!doctype html></span><span><<span>html</span>></span><span><<span>head</span>></span><span><<span>meta</span><span>charset</span>=<span>"utf-8"</span>></span><span><<span>title</span>></span><span></<span>title</span>></span><span></<span>head</span>></span><span><<span>body</span>></span><span><<span>H3</span>></span>添加管理员<span></<span>H3</span>></span><span><<span>FORM</span><span>action</span>=<span>"doAdminAction.php?act=addUser"</span><span>method</span>=<span>"post"</span>></span><span><<span>TABLE</span><span>width</span>=<span>"60%"</span><span>border</span>=<span>"1"</span><span>cellpadding</span>=<span>"5"</span><span>cellspacing</span>=<span>"0"</span><span>bgcolor</span>=<span>"#cccccc"</span>></span><span><<span>tr</span>></span><span><<span>TD</span><span>align</span>=<span>"right"</span>></span>用户名称<span></<span>TD</span>></span><span><<span>TD</span>></span><span><<span>input</span><span>type</span>=<span>"text"</span><span>name</span>=<span>"username"</span><span>placeholder</span>=<span>"请输入用户名称"</span>/></span><span></<span>TD</span>></span><span></<span>tr</span>></span><span><<span>tr</span>></span><span><<span>TD</span><span>align</span>=<span>"right"</span>></span>用户密码<span></<span>TD</span>></span><span><<span>TD</span>></span><span><<span>input</span><span>type</span>=<span>"text"</span><span>name</span>=<span>"password"</span><span>placeholder</span>=<span>"请输入用户名称"</span>/></span><span></<span>TD</span>></span><span></<span>tr</span>></span><span><<span>tr</span>></span><span><<span>TD</span><span>align</span>=<span>"right"</span>></span>用户邮箱<span></<span>TD</span>></span><span><<span>TD</span>></span><span><<span>input</span><span>type</span>=<span>"text"</span><span>name</span>=<span>"email"</span><span>placeholder</span>=<span>"请输入用户名称"</span>/></span><span></<span>TD</span>></span><span></<span>tr</span>></span><span><<span>tr</span>></span><span><<span>td</span><span>align</span>=<span>"right"</span>></span>性别<span></<span>td</span>></span><span><<span>td</span>></span><span><<span>input</span><span>type</span>=<span>"radio"</span><span>name</span>=<span>"sex"</span><span>value</span>=<span>"1"</span><span>checked</span>=<span>"checked"</span>/></span>男 <span><<span>input</span><span>type</span>=<span>"radio"</span><span>name</span>=<span>"sex"</span><span>value</span>=<span>"2"</span> /></span>女 <span><<span>input</span><span>type</span>=<span>"radio"</span><span>name</span>=<span>"sex"</span><span>value</span>=<span>"3"</span> /></span>保密 <span></<span>td</span>></span><span></<span>tr</span>></span><span><<span>tr</span>></span><span><<span>td</span><span>align</span>=<span>"right"</span>></span>头像<span></<span>td</span>></span><span><<span>td</span>></span><span><<span>input</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"face"</span> /></span><span></<span>td</span>></span><span></<span>tr</span>></span><span><<span>tr</span>></span><span><<span>TD</span><span>colspan</span>=<span>"2"</span>></span><span><<span>input</span><span>type</span>=<span>"submit"</span><span>value</span>=<span>"添加用户"</span>/></span><span></<span>TD</span>></span><span></<span>tr</span>></span><span></<span>FORM</span>></span><span></<span>body</span>></span><span></<span>html</span>></span></code>
Hier ist das Dateiverzeichnis:
Fügen Sie in doAdminAction.php für die Formularübermittlung einfach move_uploaded_file($_FILES["face"]["tmp_name"], <code>move_uploaded_file($_FILES["face"]["tmp_name"], <br>
"upload/" . $_FILES["face"]["name"]);
hinzu
"upload/" . $_FILES["face"]["name"]);Diese Codezeile kann die vom Client hochgeladenen Dateien an der entsprechenden Stelle auf dem Server platzieren. Es gibt jedoch einige Probleme mit einem solchen Code
(1) Wenn der Upload-Ordner im Admin nicht vorhanden ist, kann die Datei nicht hochgeladen werden.
(2) Der Typ der hochgeladenen Dateien wird nicht überprüft. Es ist gefährlicher, wenn Virendateien auftreten.
(3) Wenn eine Datei mit demselben Namen wie die Datei im Upload-Ordner hochgeladen wird, wird die Originaldatei ersetzt.
(4) Einige Fehler, die beim Hochladen von Dateien auftreten können, werden nicht behandelt, z. B. wenn die Dateigröße 2 MB überschreitet (die in der PHP-INI-Datei angegebene Standard-Upload-Grenzgröße beträgt 2 MB)
Hier ist die Lösung:
(1) Stellen Sie zunächst fest, ob der hochgeladene Ordner vorhanden ist. Erstellen Sie
<code><span>$path</span>=<span>"upload/"</span>; <span>//</span>如果路径不存在就建立的路径上 <span>if</span>(!file_exists(<span>$path</span>)) { mkdir(<span>$path</span>,<span>0777</span>,<span>true</span>); } </code>
. (2) Verwenden Sie strtolower(end(explode(„.“, $filename))); Dateierweiterung Vorname
Stellen Sie dann fest, ob die Erweiterung dem erforderlichen Dateityp entspricht.
(3) Verwenden Sie md5(uniqid(microtime(true),true)); um eine eindeutige Zeichenfolge zu erhalten, die mit der zuvor erhaltenen Dateierweiterung als Dateiname der hochgeladenen Datei verknüpft ist.
(4) Beginnen Sie nun mit dem Schreiben des Codes für doAdminAction. Die vierte Frage wird im Code erklärt.
<code><span><span><?php</span><span>require_once</span><span>'../include.php'</span>; <span>//print_r($_FILES["face"]);</span><span>$path</span>=<span>"upload/"</span>; <span>//如果路径不存在就建立的路径上</span><span>if</span>(!file_exists(<span>$path</span>)) { mkdir(<span>$path</span>,<span>0777</span>,<span>true</span>); } <span>//允许的类型</span><span>$allowExt</span>=<span>array</span>(<span>"gif"</span>,<span>"jpeg"</span>,<span>"png"</span>,<span>"jpg"</span>,<span>"wbmp"</span>); <span>$filename</span>=<span>$_FILES</span>[<span>"face"</span>][<span>"name"</span>]; <span>$ext</span>=getExt(<span>$filename</span>); <span>if</span>(!in_array(<span>$ext</span>,<span>$allowExt</span>)){ <span>exit</span>(<span>"非法文件类型"</span>); } <span>//得到了唯一的文件名的文件</span><span>$filename</span>=getUniName().<span>"."</span>.<span>$ext</span>; <span>if</span>(move_uploaded_file(<span>$_FILES</span>[<span>"face"</span>][<span>"tmp_name"</span>], <span>$path</span>.<span>$filename</span>)) { <span>echo</span><span>"文件上传成功"</span>; } <span>else</span> { <span>switch</span>(<span>$_FILES</span>[<span>"face"</span>][<span>'error'</span>]){ <span>case</span><span>1</span>: <span>$mes</span>=<span>"超过了配置文件上传文件的大小"</span>;<span>//UPLOAD_ERR_INI_SIZE</span><span>break</span>; <span>case</span><span>2</span>: <span>$mes</span>=<span>"超过了表单设置上传文件的大小"</span>; <span>//UPLOAD_ERR_FORM_SIZE</span><span>break</span>; <span>case</span><span>3</span>: <span>$mes</span>=<span>"文件部分被上传"</span>;<span>//UPLOAD_ERR_PARTIAL</span><span>break</span>; <span>case</span><span>4</span>: <span>$mes</span>=<span>"没有文件被上传"</span>;<span>//UPLOAD_ERR_NO_FILE</span><span>break</span>; <span>case</span><span>6</span>: <span>$mes</span>=<span>"没有找到临时目录"</span>;<span>//UPLOAD_ERR_NO_TMP_DIR</span><span>break</span>; <span>case</span><span>7</span>: <span>$mes</span>=<span>"文件不可写"</span>;<span>//UPLOAD_ERR_CANT_WRITE;</span><span>break</span>; <span>case</span><span>8</span>: <span>$mes</span>=<span>"由于PHP的扩展程序中断了文件上传"</span>;<span>//UPLOAD_ERR_EXTENSION</span><span>break</span>; } <span>echo</span><span>$mes</span>; } <span>?></span></span></code>
Sollten Fehler auftreten, werden diese ausgedruckt. Nachdem nun der Inhalt des Hochladens einer einzelnen Datei erklärt wurde, wird der obige Code nun in eine Funktion gekapselt.
<code><span><?php</span><span><span>function</span><span>uploadFile</span><span>(<span>$path</span>=<span>"upload/"</span>,<span>$allowExt</span>=array<span>(<span>"gif"</span>,<span>"jpeg"</span>,<span>"png"</span>,<span>"jpg"</span>,<span>"wbmp"</span>)</span>,<span>$imgFlag</span>=true)</span> {</span><span>//如果路径不存在就建立的路径上</span><span>if</span>(!file_exists(<span>$path</span>)) { mkdir(<span>$path</span>,<span>0777</span>,<span>true</span>); } <span>//允许的类型</span><span>$filename</span>=<span>$_FILES</span>[<span>"face"</span>][<span>"name"</span>]; <span>$ext</span>=getExt(<span>$filename</span>); <span>if</span>(!in_array(<span>$ext</span>,<span>$allowExt</span>)){ <span>exit</span>(<span>"非法文件类型"</span>); } <span>if</span>(<span>$imgFlag</span>){ <span>//如何验证图片是否是一个真正的图片类型</span><span>//getimagesize($filename):验证文件是否是图片类型 正确返回数组错误返回false</span><span>$info</span>=getimagesize(<span>$tmp_name</span>); <span>//var_dump($info);exit;</span><span>if</span>(!<span>$info</span>){ <span>exit</span>(<span>"不是真正的图片类型"</span>); } } <span>//得到了唯一的文件名的文件</span><span>$filename</span>=getUniName().<span>"."</span>.<span>$ext</span>; <span>if</span>(move_uploaded_file(<span>$_FILES</span>[<span>"face"</span>][<span>"tmp_name"</span>], <span>$path</span>.<span>$filename</span>)) { <span>echo</span><span>"文件上传成功"</span>; } <span>else</span> { <span>switch</span>(<span>$_FILES</span>[<span>"face"</span>][<span>'error'</span>]){ <span>case</span><span>1</span>: <span>$mes</span>=<span>"超过了配置文件上传文件的大小"</span>;<span>//UPLOAD_ERR_INI_SIZE</span><span>break</span>; <span>case</span><span>2</span>: <span>$mes</span>=<span>"超过了表单设置上传文件的大小"</span>; <span>//UPLOAD_ERR_FORM_SIZE</span><span>break</span>; <span>case</span><span>3</span>: <span>$mes</span>=<span>"文件部分被上传"</span>;<span>//UPLOAD_ERR_PARTIAL</span><span>break</span>; <span>case</span><span>4</span>: <span>$mes</span>=<span>"没有文件被上传"</span>;<span>//UPLOAD_ERR_NO_FILE</span><span>break</span>; <span>case</span><span>6</span>: <span>$mes</span>=<span>"没有找到临时目录"</span>;<span>//UPLOAD_ERR_NO_TMP_DIR</span><span>break</span>; <span>case</span><span>7</span>: <span>$mes</span>=<span>"文件不可写"</span>;<span>//UPLOAD_ERR_CANT_WRITE;</span><span>break</span>; <span>case</span><span>8</span>: <span>$mes</span>=<span>"由于PHP的扩展程序中断了文件上传"</span>;<span>//UPLOAD_ERR_EXTENSION</span><span>break</span>; } <span>echo</span><span>$mes</span>; } }</code>
Es gibt zwei Situationen für das Hochladen mehrerer Dateien
(1) Mehrere einzelne Datei-Uploads
<code><span><!doctype html></span><span><<span>html</span>></span><span><<span>head</span>></span><span><<span>meta</span><span>charset</span>=<span>"utf-8"</span>></span><span><<span>title</span>></span><span></<span>title</span>></span><span></<span>head</span>></span><span><<span>body</span>></span><span><!-- 表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。默认情况,这个编码格式是application/x-www-form-urlencoded,不能用于文件上传;只有使用了multipart/form-data,才能完整的传递文件数据,进行下面的操作. --></span><span><<span>FORM</span><span>action</span>=<span>"doAction2.php"</span><span>method</span>=<span>"post"</span><span>enctype</span>=<span>"multipart/form-data"</span>></span><span><<span>INPUT</span><span>type</span>=<span>"hidden"</span><span>name</span>=<span>"MAX_FILE_SIZE"</span><span>value</span>=<span>"1048576"</span>/></span> 请选择上传文件:<span><<span>INPUT</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"myFile1"</span>/></span><span><<span>br</span>/></span> 请选择上传文件:<span><<span>INPUT</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"myFile2"</span>/></span><span><<span>br</span>/></span> 请选择上传文件:<span><<span>INPUT</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"myFile3"</span>/></span><span><<span>br</span>/></span><span><<span>input</span><span>type</span>=<span>"submit"</span><span>value</span>=<span>"上传"</span>/></span><span></<span>FORM</span>></span><span></<span>body</span>></span><span></<span>html</span>></span></code>
Dieses Formular entspricht dem Hochladen mehrerer einzelner Dateien, print_r($_FILES); in doAction2.php get
<code><span>Array</span> ( [myFile1] => <span>Array</span> ( [name] => touxiang.jpg [type] => image/jpeg [tmp_name] => D:\xampp\tmp\php79E3.tmp [error] => <span>0</span> [size] => <span>28747</span> ) [myFile2] => <span>Array</span> ( [name] => 文章.png [type] => image/png [tmp_name] => D:\xampp\tmp\php7A03.tmp [error] => <span>0</span> [size] => <span>11655</span> ) [myFile3] => <span>Array</span> ( [name] => 增加.png [type] => image/png [tmp_name] => D:\xampp\tmp\php7A04.tmp [error] => <span>0</span> [size] => <span>7439</span> ) )</code>
(2) Hochladen mehrerer Dateien
<code><span><!doctype html></span><span><<span>html</span>></span><span><<span>head</span>></span><span><<span>meta</span><span>charset</span>=<span>"utf-8"</span>></span><span><<span>title</span>></span><span></<span>title</span>></span><span></<span>head</span>></span><span><<span>body</span>></span><span><!-- 表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。默认情况,这个编码格式是application/x-www-form-urlencoded,不能用于文件上传;只有使用了multipart/form-data,才能完整的传递文件数据,进行下面的操作. --></span><span><<span>FORM</span><span>action</span>=<span>"doAction2.php"</span><span>method</span>=<span>"post"</span><span>enctype</span>=<span>"multipart/form-data"</span>></span><span><<span>INPUT</span><span>type</span>=<span>"hidden"</span><span>name</span>=<span>"MAX_FILE_SIZE"</span><span>value</span>=<span>"1048576"</span>/></span> 请选择上传文件:<span><<span>INPUT</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"myFile[]"</span>/></span><span><<span>br</span>/></span> 请选择上传文件:<span><<span>INPUT</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"myFile[]"</span>/></span><span><<span>br</span>/></span> 请选择上传文件:<span><<span>INPUT</span><span>type</span>=<span>"file"</span><span>name</span>=<span>"myFile[]"</span>/></span><span><<span>br</span>/></span><span><<span>input</span><span>type</span>=<span>"submit"</span><span>value</span>=<span>"上传"</span>/></span><span></<span>FORM</span>></span><span></<span>body</span>></span><span></<span>html</span>></span></code>
Ähnlich print_r($_files)
<code><span>Array</span> ( [myFile] => <span>Array</span> ( [name] => <span>Array</span> ( [<span>0</span>] => touxiang.jpg [<span>1</span>] => 文章.png [<span>2</span>] => 增加.png ) [type] => <span>Array</span> ( [<span>0</span>] => image/jpeg [<span>1</span>] => image/png [<span>2</span>] => image/png ) [tmp_name] => <span>Array</span> ( [<span>0</span>] => D:\xampp\tmp\php1EC.tmp [<span>1</span>] => D:\xampp\tmp\php1ED.tmp [<span>2</span>] => D:\xampp\tmp\php1EE.tmp ) [error] => <span>Array</span> ( [<span>0</span>] => <span>0</span> [<span>1</span>] => <span>0</span> [<span>2</span>] => <span>0</span> ) [size] => <span>Array</span> ( [<span>0</span>] => <span>28747</span> [<span>1</span>] => <span>11655</span> [<span>2</span>] => <span>7439</span> ) ) ) </code>
und feststellen, dass es viele Unterschiede in den Arrays gibt, die mit den beiden Methoden erhalten werden.
Für den ersten Fall (entspricht einem Dateiarray) können wir
<code><span>foreach</span> (<span>$_FILES</span><span>as</span><span>$var</span>) { <span>//对于每一个文件进行了文件上传操作</span><span>$info</span>=uploadFile(<span>$var</span>); <span>echo</span><span>$info</span>; }</code>
Für den zweiten Fall können wir das gezeigte dreidimensionale Array in das im ersten Fall gezeigte zweidimensionale Array umwandeln, also Can .
<code>foreach(<span>$_FILES</span>[myFile][name] as <span>$key</span>=><span>$var</span> ) { <span>$files</span>[<span>$key</span>][name]=<span>$_FILES</span>[myFile][name][<span>$key</span>]; <span>$files</span>[<span>$key</span>][type]=<span>$_FILES</span>[myFile][type][<span>$key</span>]; <span>$files</span>[<span>$key</span>][tmp_name]=<span>$_FILES</span>[myFile][tmp_name][<span>$key</span>]; <span>$files</span>[<span>$key</span>][<span>error</span>]=<span>$_FILES</span>[myFile][<span>error</span>][<span>$key</span>]; <span>$files</span>[<span>$key</span>][<span>size</span>]=<span>$_FILES</span>[myFile][<span>size</span>][<span>$key</span>]; } print_r(<span>$files</span>);</code>
Das Ergebnis
<code><span>Array</span> ( [<span>0</span>] => <span>Array</span> ( [name] => touxiang.jpg [type] => image/jpeg [tmp_name] => D:\xampp\tmp\php3227.tmp [error] => <span>0</span> [size] => <span>28747</span> ) [<span>1</span>] => <span>Array</span> ( [name] => 文章.png [type] => image/png [tmp_name] => D:\xampp\tmp\php3228.tmp [error] => <span>0</span> [size] => <span>11655</span> ) [<span>2</span>] => <span>Array</span> ( [name] => 增加.png [type] => image/png [tmp_name] => D:\xampp\tmp\php3229.tmp [error] => <span>0</span> [size] => <span>7439</span> ) )</code>
war erfolgreich. Jetzt beginnen wir mit der Kapselung einer Datei-Upload-Funktion. Diese Funktion kann sowohl das Hochladen einzelner Dateien als auch mehrere Dateien verarbeiten. Dann müssen wir nur noch diesen Teil der Array-Verarbeitung schreiben und die Funktion upload() aufrufen.
<code><span><?php</span><span>require_once</span><span>"../include.php"</span>; <span>//用于转换数组</span><span><span>function</span><span>buildInfo</span><span>()</span> {</span><span>foreach</span>(<span>$_FILES</span><span>as</span><span>$file</span>) { <span>$i</span>=<span>0</span>; <span>if</span>(is_string(<span>$file</span>[<span>'name'</span>])) { <span>$files</span>[<span>$i</span>]=<span>$file</span>; <span>$i</span>++; } <span>else</span> { <span>foreach</span>(<span>$file</span>[name] <span>as</span><span>$key</span>=><span>$var</span>) { <span>$files</span>[<span>$key</span>][name]=<span>$file</span>[name][<span>$key</span>]; <span>$files</span>[<span>$key</span>][type]=<span>$file</span>[type][<span>$key</span>]; <span>$files</span>[<span>$key</span>][tmp_name]=<span>$file</span>[tmp_name][<span>$key</span>]; <span>$files</span>[<span>$key</span>][error]=<span>$file</span>[error][<span>$key</span>]; <span>$files</span>[<span>$key</span>][size]=<span>$file</span>[size][<span>$key</span>]; } } } <span>return</span><span>$files</span>; } <span>//用于上传</span><span><span>function</span><span>uploadFile</span><span>(<span>$path</span>=<span>"upload/"</span>,<span>$allowExt</span>=array<span>(<span>"gif"</span>,<span>"jpeg"</span>,<span>"png"</span>,<span>"jpg"</span>,<span>"wbmp"</span>)</span>)</span> {</span><span>//如果路径不存在就建立的路径上</span><span>if</span>(!file_exists(<span>$path</span>)) { mkdir(<span>$path</span>,<span>0777</span>,<span>true</span>); } <span>$files</span>=buildInfo(); <span>foreach</span>(<span>$files</span><span>as</span><span>$file</span>) { <span>//允许的类型</span><span>$filename</span>=<span>$file</span>[<span>"name"</span>]; <span>$ext</span>=getExt(<span>$filename</span>); <span>if</span>(!in_array(<span>$ext</span>,<span>$allowExt</span>)){ <span>exit</span>(<span>"非法文件类型"</span>); } <span>//校验是否是一个真正的图片类型</span><span>if</span>(<span>$imgFlag</span>){ <span>if</span>(!getimagesize(<span>$file</span>[<span>'tmp_name'</span>])){ <span>exit</span>(<span>"不是真正的图片类型"</span>); } } <span>//得到了唯一的文件名的文件</span><span>$filename</span>=getUniName().<span>"."</span>.<span>$ext</span>; <span>if</span>(move_uploaded_file(<span>$file</span>[<span>"tmp_name"</span>], <span>$path</span>.<span>$filename</span>)) { <span>echo</span><span>"文件上传成功"</span>; } <span>else</span> { <span>switch</span>(<span>$file</span>[<span>'error'</span>]){ <span>case</span><span>1</span>: <span>$mes</span>=<span>"超过了配置文件上传文件的大小"</span>;<span>//UPLOAD_ERR_INI_SIZE</span><span>break</span>; <span>case</span><span>2</span>: <span>$mes</span>=<span>"超过了表单设置上传文件的大小"</span>; <span>//UPLOAD_ERR_FORM_SIZE</span><span>break</span>; <span>case</span><span>3</span>: <span>$mes</span>=<span>"文件部分被上传"</span>;<span>//UPLOAD_ERR_PARTIAL</span><span>break</span>; <span>case</span><span>4</span>: <span>$mes</span>=<span>"没有文件被上传"</span>;<span>//UPLOAD_ERR_NO_FILE</span><span>break</span>; <span>case</span><span>6</span>: <span>$mes</span>=<span>"没有找到临时目录"</span>;<span>//UPLOAD_ERR_NO_TMP_DIR</span><span>break</span>; <span>case</span><span>7</span>: <span>$mes</span>=<span>"文件不可写"</span>;<span>//UPLOAD_ERR_CANT_WRITE;</span><span>break</span>; <span>case</span><span>8</span>: <span>$mes</span>=<span>"由于PHP的扩展程序中断了文件上传"</span>;<span>//UPLOAD_ERR_EXTENSION</span><span>break</span>; } <span>echo</span><span>$mes</span>; } } }</span></code>
Dieser Code fügt außerdem eine Prüfung hinzu, ob das hochgeladene Bild im Bildformat vorliegt, und eine Prüfung der Bildgröße, da einige Virendateien als Bilddateien getarnt werden.
Das Obige stellt die Demo zur Verwendung von PHP zum Abschließen einer Benutzerregistrierung und -verwaltung vor (PHP realisiert das Hochladen einzelner Dateien und mehrerer Dateien), einschließlich der relevanten Inhalte. Ich hoffe, dass es für Freunde hilfreich ist, die an PHP-Tutorials interessiert sind.