![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| Code: if (!($uploaded_type=="audio/mp3")) {
echo "You may only upload MP3 files.<br>";
$ok=0;
} and this is the upload part of my form Code: <?php
$target = "upload";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if ($uploaded_size > 7000000)
{
echo "Your file is too large.<br>";
$ok=0;
}
if($imageinfo['mime']!='audio/mp3'){
echo "We only accept mp3 music fies.";
$ok=o;
}
if ($uploaded_type =="text/php")
{
echo "No PHP files<br>";
$ok=0;
}
if ($ok==0)
{
Echo "";
}
{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
}
?> |
| ||||
| Quote:
PHP: Handling file uploads - Manual |
| |||
| Remember, when loading XML from Flash - flash REEEEEALLY wants to cache that xml file so load the xml data (especially if it's real-time created on the fly) to load it like blah.xml?randomid=102934 and it will verify a fresh pull of the xml data every time ![]() __________________ Day Cares | Golf Courses | Disc Golf Courses | Campgrounds | Ice Rinks | Paintball Fields | Dentists | Plastic Surgeons | Aging Jokes Catholic Churches | Lutheran Churches | Methodist Churches | Episcopal Churches | Clean Jokes |
| The Following User Says Thank You to ccoonen For This Useful Post: | ||
TeraTask (11-14-2007) | ||
![]() |
| Thread Tools | |
| Display Modes | |
| |