Created
January 16, 2009 16:37
-
-
Save shimarin/47988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><body> | |
<?php if (!$_FILES) {?> | |
<h1>STBBS.NET, LLC ファイルアップロード</h1> | |
<form enctype="multipart/form-data" method="POST"> | |
<!-- MAX_FILE_SIZE must precede the file input field --> | |
<input type="hidden" name="MAX_FILE_SIZE" value="3000000" /> | |
<!-- Name of input element determines name in $_FILES array --> | |
送信するファイル: <input name="userfile" type="file" /><br/> | |
<input type="submit" value="送信する" /> | |
</form> | |
<?php } else { | |
$tmpname = $_FILES['userfile']['tmp_name']; | |
$filename = $_FILES['userfile']['name']; | |
$uploadfile = '/var/share/dropbox/upload_' | |
. date("YmdHis") . "_" . basename($filename); | |
$rst = move_uploaded_file($tmpname, $uploadfile); | |
?> | |
<h1>アップロード結果</h1> | |
<?php echo $rst? "アップロード成功" : "アップロード失敗"; ?><br/> | |
<a href="./">戻る</a> | |
<?php } ?> | |
</body></html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment