Advertisement
Advertisement
| 05.07.2008 at 11:35AM PDT, ID: 23383828 | Points: 500 |
|
[x]
Attachment Details
|
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.07.2008 at 11:40AM PDT, ID: 21519190 |
| 05.07.2008 at 11:56AM PDT, ID: 21519313 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script type="text/javascript"><!--
function checkFile(o)
{
if( o.value && !/\.(zip|jpeg|jpg)$/i.test(o.value) )
{
alert( "Only zip and jpeg files are allowed");
return false;
}
else if( o.value=="" )
{
alert("You did not specify a file.");
return false;
}
return true;
}
//--></script>
</head>
<body>
<form enctype="multipart/form-data" action="uploader.php" method="POST" onsubmit="return checkFile(uploadedfile);">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" id="uploadedfile" type="file" onchange="checkFile(this)" /><br />
<input type="submit" value="Upload File" />
</form></form>
</body>
</html>
|
| 05.07.2008 at 02:20PM PDT, ID: 21520444 |
| 05.07.2008 at 02:32PM PDT, ID: 21520527 |
| 05.07.2008 at 02:39PM PDT, ID: 21520567 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: |
Warning: move_uploaded_file(/var/www/uploads/Winter.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /data/15/1/50/80/1376895/user/1477063/htdocs/uploader.php on line 8
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/data/tmp/phpjWUKQo' to '/var/www/uploads/Winter.jpg' in /data/15/1/50/80/1376895/user/1477063/htdocs/uploader.php on line 8
Upload failed
Here is some more debugging info:Array
(
[userfile] => Array
(
[name] => Winter.jpg
[type] => image/pjpeg
[tmp_name] => /data/tmp/phpjWUKQo
[error] => 0
[size] => 105542
)
)
|
| 05.07.2008 at 02:49PM PDT, ID: 21520635 |
| 05.07.2008 at 03:23PM PDT, ID: 21520872 |
| 05.07.2008 at 03:41PM PDT, ID: 21520984 |
| 05.07.2008 at 04:10PM PDT, ID: 21521149 |
| 05.07.2008 at 04:17PM PDT, ID: 21521193 |
| 05.08.2008 at 11:35AM PDT, ID: 21527260 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: |
<?php
$uploaddir = '/data/15/1/50/80/1376895/user/1477063/htdocs/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
echo "<p>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Upload failed";
}
echo "</p>";
echo '<pre>';
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
FILE UPLOADED!!!
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="512000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
</body>
</html>
|
| 05.08.2008 at 11:37AM PDT, ID: 21527269 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="512000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
</body>
</html>
|
| 05.09.2008 at 09:06AM PDT, ID: 21534248 |