diff options
author | Jan Klemkow <j.klemkow@wemelug.de> | 2012-11-22 09:19:22 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-24 12:30:09 +0100 |
commit | 370168684765919be5da44851060e641fd502dfc (patch) | |
tree | 71dd4aea9fb3679921d3f0f7a52615f871718982 /doc/niels-diplom/Dateistruktur/admin/upload.php | |
parent | bde079b899066bec3b89b3ac659bec00a73afe8c (diff) | |
download | sqltutor-plugin-370168684765919be5da44851060e641fd502dfc.tar.gz sqltutor-plugin-370168684765919be5da44851060e641fd502dfc.tar.bz2 sqltutor-plugin-370168684765919be5da44851060e641fd502dfc.zip |
Add documentation and perl/php code from niels diploma.
Diffstat (limited to 'doc/niels-diplom/Dateistruktur/admin/upload.php')
-rwxr-xr-x | doc/niels-diplom/Dateistruktur/admin/upload.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/niels-diplom/Dateistruktur/admin/upload.php b/doc/niels-diplom/Dateistruktur/admin/upload.php new file mode 100755 index 0000000..1ef34c3 --- /dev/null +++ b/doc/niels-diplom/Dateistruktur/admin/upload.php @@ -0,0 +1,25 @@ +<?
+
+$uploadDir = '/usr/local/apache/htdocs_ssl/dipl/admin/LIST/';
+$uploadFile = $uploadDir . $_FILES['userfile']['name'];
+
+print "<pre>";
+if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
+{
+ print "File is valid, and was successfully uploaded. ";
+ print "Here's some more debugging info:\n";
+ print_r($_FILES);
+}
+else
+{
+ print "Possible file upload attack! Here's some debugging info:\n";
+ print_r($_FILES);
+}
+print "</pre>";
+?>
+
+<form enctype="multipart/form-data" action="upload.php" method="post">
+ <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
+ Choose a file to upload: <input name="userfile" type="file" />
+ <input type="submit" value="Upload File" />
+</form>
|