Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/top_msg.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/php/forward/upload/upload.php on line 22
Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/top_msg.php' for inclusion (include_path='.:/usr/local/php/7.4/lib/php') in /home/users/2/moriya-h5/web/confrage/php/forward/upload/upload.php on line 22
目次 |
---|
・ファイルアップロード ・サンプルコード ・サンプル |
(php部) <?php // 実行ボタンが押された時 if (isset($_POST[btnExec])) { // ファイルの転送先を設定します。ファイルパス(絶対パス、ファイル名まで含む)を指定します。 // また、転送先はパーミッションの書き込み権限を許可してください。 $movetofile = "fullpath/" . $_FILES[uploadfile][name]; // テンポラリファイルを正規の場所に移動します。 move_uploaded_file( $_FILES[uploadfile][tmp_name], $movetofile ); } ?>
(html部) <form method="post" enctype="multipart/form-data"> <input type="file" name="uploadfile" size="75"> <input type="submit" name="btnExec" value="実行"> </form>