Results 1 to 6 of 6

Thread: Web Problem

  1. #1
    yahookillers is offline Senior Member+
    Last Online
    26th June 2014 @ 04:54 PM
    Join Date
    05 May 2009
    Location
    Peshawar Nwfp Pakistan
    Age
    34
    Posts
    541
    Threads
    196
    Credits
    584
    Thanked
    8

    Default Web Problem



    PHP mein file upload ki coding ki ha ap zara ye coding dekh k batyein k es mein kiya problem ha kiyon k mujeh bar bar ye error deta ha jo neechai pic mein pic se pehlai coding deikh lein :



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <?php
    // properties of uploaded file
    $name = $_FILES["myfile"]["name'];
    $type = $_FILES["myfile"]["type"];
    $size = $_FILES["myfile"]["size"];
    $temp = $_FILES["myfile"]["tmp_name"];
    $error = $_FILES["myfile"]["error"];

    echo $name;
    echo "<br>";
    echo $type;
    echo "<br>";
    echo $size;
    echo "<br>";
    echo $temp;
    echo "<br>";
    echo $error;

    if ($error > 0)
    die("Error Uploading fil code $error.");
    else
    {

    if ($type == "video/flv") // conditions for the file
    {
    die("this formate is not allowed");
    }
    else
    {
    move_uploaded_file($temp, "uploaded/".$name);
    echo "Upload Complete";
    }

    ?>
    </body>
    </html>
    Attached Images Attached Images  

  2. #2
    umair8005's Avatar
    umair8005 is offline Senior Member
    Last Online
    8th April 2019 @ 04:06 PM
    Join Date
    24 Sep 2006
    Location
    ~~ SOME 1 HEART ~~
    Posts
    8,820
    Threads
    326
    Credits
    0
    Thanked
    457

    Default

    w/salam...

    chk dis...

    php file upload script

  3. #3
    yahookillers is offline Senior Member+
    Last Online
    26th June 2014 @ 04:54 PM
    Join Date
    05 May 2009
    Location
    Peshawar Nwfp Pakistan
    Age
    34
    Posts
    541
    Threads
    196
    Credits
    584
    Thanked
    8

    Default

    bahi es mein to srf conditions hain ..... mujeh proper cahiye ... agar ap ko es link pai complete smjh araha ha to plz wahan se copy kar k yahan pori coding tarteeb se de dein

  4. #4
    umair8005's Avatar
    umair8005 is offline Senior Member
    Last Online
    8th April 2019 @ 04:06 PM
    Join Date
    24 Sep 2006
    Location
    ~~ SOME 1 HEART ~~
    Posts
    8,820
    Threads
    326
    Credits
    0
    Thanked
    457

    Default

    tym lge ga...shayed kal rat tk ya fir sham tk rply kr skoun...

  5. #5
    umair8005's Avatar
    umair8005 is offline Senior Member
    Last Online
    8th April 2019 @ 04:06 PM
    Join Date
    24 Sep 2006
    Location
    ~~ SOME 1 HEART ~~
    Posts
    8,820
    Threads
    326
    Credits
    0
    Thanked
    457

    Default

    aap coding wahan se copy paste krein....aapka prob solve ho jai ga..wrna w8...

  6. #6
    hamayun_4u2004's Avatar
    hamayun_4u2004 is offline Senior Member+
    Last Online
    23rd April 2016 @ 05:30 AM
    Join Date
    24 Jul 2006
    Location
    pakistan/Risalpur
    Age
    34
    Posts
    502
    Threads
    101
    Credits
    996
    Thanked
    9

    Default

    dear... ye lo.....
    jab array sy data get karty hoo tu single quote use kia karoo..
    ap ny " " use kiye hain...

    ap ny files array main double quotes use kiye hain...
    matlab kahain single and kahain double quotes hain...



    Code:
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <?php
    // properties of uploaded file
    
    $name = $_FILES['myfile']['name'];
    $type = $_FILES['myfile']['type'];
    $size = $_FILES['myfile']['size'];
    $temp = $_FILES['myfile']['tmp_name'];
    $error = $_FILES['myfile']['error'];
    
    echo $name;
    echo "<br>";
    echo $type;
    echo "<br>";
    echo $size;
    echo "<br>";
    echo $temp;
    echo "<br>";
    echo $error;
    
    if ($error > 0)
        {
            die("Error Uploading fil code $error.");
        }else{
    
                if ($type == "video/flv") // conditions for the file
                {
                    die("this formate is not allowed");
                }else{
                    
                        move_uploaded_file($temp, "uploaded/".$name);
                        echo "Upload Complete";
                    }
        }
    
    ?>
    
    </body>
    </html>
    "NeVeR St0P tH!Nk!nG, BecoZ L!Fe Is THe G@mE OF LuCk"

    "L!Fe !s aN Experience, Try T0 Get L!L OnCe A DaY"
    (QaZ! HaMaYuN)

Similar Threads

  1. IT Problem Window XP Boot logo problem and desktop late show
    By Pasaris Case in forum Ask an Expert
    Replies: 6
    Last Post: 12th September 2015, 06:50 PM
  2. help me nokia n900 maemo phone lock problem and software problem
    By FARRUKH MALIK in forum Mobile phones problems and Help Zone
    Replies: 2
    Last Post: 2nd January 2012, 03:33 PM
  3. free gprs for jazz problem, nokia 5310 problem
    By ADNANNAWAZ in forum Mobile phones problems and Help Zone
    Replies: 19
    Last Post: 2nd November 2011, 01:29 AM
  4. Nokia 6600 InterNet Problem PC 2 Mobile GPRS Plz Slove My Problem?
    By Wakeel Ahmed in forum Mobile phones problems and Help Zone
    Replies: 4
    Last Post: 5th October 2009, 10:16 PM

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
  •