SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile got problem in uploading flash file here...

    hello all, i am doing a project that make some uploaded tools in uploading file to server (web) but the problem that i facing here is i cant upload a flash file,some body can help ??


    if($_FILES['txtFile']){
    if($_FILES['txtFile']['type'] == "image/pjpeg" || $_FILES['test']['type'] == "image/gif"){
    if($_FILES['txtFile']['size'] <= (300 * 1024)){
    if(!is_dir($_REQUEST['txtGame'])){
    mkdir($_REQUEST['txtGame']);
    }
    if(!is_dir($_REQUEST['txtGame']."/".$_REQUEST['txtCat'])){
    mkdir($_REQUEST['txtGame']."/".$_REQUEST['txtCat']);
    }
    $filename = $_REQUEST['txtGame']."/".$_REQUEST['txtCat']."/".$_FILES['txtFile']['name'];
    echo $filename;

    if(move_uploaded_file($_FILES['txtFile']['tmp_name'],$filename)){
    echo "Success !";
    }else{
    echo "Failed !";
    }

    }else{
    echo "Invalid File Size !";
    }
    }else{
    echo "Invalid File Type !";
    }
    }
    Dont blame, just start from today...
    Dont wait, do it start from this minit...

  2. #2
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your above code does not allow SWF or FLV to be uploaded.

    Allow this application/x-shockwave-flash and video/x-flv. I think it should allow the uploading of SWF and FLV files.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    thank you very much thewebhostingdir, i really appreciated your answer.
    Dont blame, just start from today...
    Dont wait, do it start from this minit...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •