Új hozzászólás Aktív témák

  • jeszi

    tag

    Sziasztok!

    Mi kell ahhoz, hogy ez hiba nélkül lefusson, ha .jar fájlt adok meg a formon?
    Debian 6, PHP 5.3.3-7

    Most tettem fel php-java-bridge extensiont, de nem oldotta meg. Apache mime type-ot is kellene állítani?

    <?php
    phpinfo();

    if ( isset($_POST["test"]) )
    {
    echo "<pre>";
    print_r($_FILES);
    echo "</pre>";

    $handle = fopen($_FILES["a"]["tmp_name"],"r");
    $contents = fread($handle, filesize($_FILES["iscore"]["tmp_name"]));

    echo $contents;
    }

    ?>

    <!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=iso-8859-2" />
    <title>Untitled Document</title>
    </head>

    <body>
    <form method="post" enctype="multipart/form-data" action="fileuploadtest.php">
    <TABLE cellpadding="2" cellspacing="0" border="0">
    <tr>
    <td><input type="file" name="iscore" class="text"></td>
    <td><input type="submit" name="test" value="Teszt" class="text"></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Ez a kimenet:

    Array
    (
    [iscore] => Array
    (
    [name] => iScore.jar
    [type] =>
    [tmp_name] =>
    [error] => 1
    [size] => 0
    )

    )

    Apache error logban nincs bejegyzés.

Új hozzászólás Aktív témák