<?php
$target = "images/stories/video/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
//This is our size condition
if ($uploaded_size > 3500000)
{
echo "Your file is too large.<br>";
$ok=0;
}
//This is our limit file type condition
if ($uploaded_type =="text/php")
{
echo "No PHP files allowed<br>";
$ok=0;
}
//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
Echo "Sorry your file was not uploaded";
}
//If everything is ok we try to upload it
else
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "File uploaded successfully! Copy the code below and paste into your blog entry. <br/><br/>{flv}". basename( $_FILES['uploaded']['name']). "{/flv}";
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
?>
<br/><br/>
<a href="index.php?option=com_myblog&Itemid=129">Back to Blog Homepage</a>
$name = substr($fileName, 0, strrpos($fileName, '.'));
Time to create page: 0.073 seconds