It looks like you're new here. If you want to get involved, click one of these buttons!
<script type=\"text/javascript\">
$(document).ready(function() {
$(\"#uplFile\").uploadify({
'uploader' : '/cms/uploadify/example/scripts/uploadify.swf',
'script' : '/cms/uploadify/example/scripts/uploadify.php',
'cancelImg' : '../cancel.png',
'multi' : true
});
});
</script>
<input id=\"uplFile\" name=\"uplFile\" type=\"file\" />
<a href=\"javascript:$('#uplFile').uploadifyUpload();\">Upload Files</a> |
<a href=\"javascript:$('#uplFile').uploadifyClearQueue();\">Clear Queue</a>
if (!empty($_FILES)) {
$tempFile = $_FILES['uplFile']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . '\\images\\uploads\\test\\';
$fileName = $_FILES['uplFile']['name'];
$targetFile = $targetPath . $fileName;
@ $fp = fopen($_SERVER['DOCUMENT_ROOT'] . \"\\images\\uploads\\test\\output.txt\", \"wb\");
fwrite($fp, \"Saving \" . $tempFile . \" (formerly \" . $fileName . \") to \" . $targetFile . \"\r\n\");
if (move_uploaded_file($tempFile,$targetFile)) {
fwrite($fp, \"Success\r\n\");
} else {
switch ($_FILES['uplFile'] ['error'])
{ case 1:
fwrite($fp, \"The file is bigger than this PHP installation allows\r\n\");
break;
case 2:
fwrite($fp, \"The file is bigger than this form allows\r\n\");
break;
case 3:
fwrite($fp, \"Only part of the file was uploaded\r\n\");
break;
case 4:
fwrite($fp, \"No file was uploaded\r\n\");
break;
}
}
fclose($fp);
echo \"1\";
}$targetPath = $_SERVER['DOCUMENT_ROOT'] . '\\images\\uploads\\test\\';
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title>Uploadify Example Script</title>
<link href=\"css/default.css\" rel=\"stylesheet\" type=\"text/css\" />
<link href=\"css/uploadify.css\" rel=\"stylesheet\" type=\"text/css\" />
<script type=\"text/javascript\" src=\"scripts/jquery-1.3.2.min.js\"></script>
<script type=\"text/javascript\" src=\"scripts/swfobject.js\"></script>
<script type=\"text/javascript\" src=\"scripts/jquery.uploadify.v2.1.0.min.js\"></script>
<script type=\"text/javascript\">
$(document).ready(function() {
$(\"#uplFile\").uploadify({
'uploader' : 'scripts/uploadify.swf',
'script' : 'scripts/uploadify.php',
'cancelImg' : '../cancel.png',
'multi' : true
});
});
</script>
</head>
<body>
<input id=\"uplFile\" name=\"uplFile\" type=\"file\" /> <a href=\"javascript:$('#uplFile').uploadifyUpload();\">Upload Files</a> | <a href=\"javascript:$('#uplFile').uploadifyClearQueue();\">Clear Queue</a>
</body>
</html>
if (!empty($_FILES)) {
$tempFile = $_FILES['uplFile']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . \"\\images\\uploads\\test\\\";
$fileName = $_FILES['uplFile']['name'];
$targetFile = $targetPath . $fileName;
@ $fp = fopen($_SERVER['DOCUMENT_ROOT'] . \"\\images\\uploads\\test\\output.txt\", \"wb\");
fwrite($fp, \"Saving \" . $tempFile . \" (formerly \" . $fileName . \") to \" . $targetFile . \"\r\n\");
if (move_uploaded_file($tempFile,$targetFile)) {
fwrite($fp, \"Success\r\n\");
}
fclose($fp);
echo \"1\";
}