Ga Terug   Leerlingen.com Forum > Multi Media > Computers & Internet
FAQ Ledenlijst Kalender Zoeken Berichten van vandaag Markeer forums als gelezen

Computers & Internet Problemen met je computer, of weet je niet welke router nu te moeten installeren voor je breedbandje? Dit, en andere zaken vind je hier!

 
 
Onderwerpopties Waardering: Onderwerp waardering: 10 stemmen, 5,00 gemiddeld. Weergavemodus
Prev Vorige Bericht   Volgende Bericht Next
Oud 10 January 2004, 18:10   #23
Pakspul
Banned
 
Pakspul's Avatar
 
Geregistreerd op: 11 February 2002
Locatie: Hengelo
Berichten: 12.521
Standaard

werkend:

PHP Code:
<html> 
<head> 
<title>Nieuwe pagina 1</title> 
</head> 
<body> 
<? 
if ( isset($_POST['submit']) && !empty($_POST['submit']) )

    
// hier de html voor het formulier 
    
?> 

    <form name=fileform method=post enctype='multipart/form-data'> 
    <input type='file' name='userfile'> 
    <input type="submit" value="Verzenden" name="submit"></p> 
    </form> 
    <? 
}
else
{
    
$upload_mode = (@ini_get('open_basedir') || @ini_get('safe_mode')) ? 'move' 'copy'

    
$source_filename $_FILES['userfile']['tmp_name'];

    
$destination_filename "./"$_FILES['userfile']['name']; 

    switch (
$upload_mode
    {
        case 
'copy'
        if ( !
copy($source_filename$destination_filename) ) 
        { 
            if ( !@
move_uploaded_file($source_filename$destination_filename) ) 
            { 
                echo 
"er gaat toch iets mis.<br>"__LINE__

                exit; 
            } 
        } 
        @
chmod('./' $source_filename0666); 
        break; 

    case 
'move'
        if ( !@
move_uploaded_file($source_filename$destination_filename) ) 
        { 
            if ( !@
copy($source_file$destination_filename) ) 
            { 
                echo 
"er gaat toch iets mis.<br>"__LINE__

                exit; 
            } 
        } 

        @
chmod($config['upload_dir'] . '/' $destination_filename0666); 
        break; 
    } 

    echo 
"Pakspul heerscht"
    exit; 
}



?> 
</body> 
</html>
voor het aanpassen van de directory moet je regel 24 aanpassen ($destination_filename = "./". $_FILES['userfile']['name']; )

geen dank doe maar admin rechten
Pakspul is offline   Met citaat antwoorden
 

Onderwerpopties
Weergavemodus Stem op dit onderwerp:
Stem op dit onderwerp::

Berichting Regels
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Aan
Smilies zijn Aan
[IMG] code is Aan
HTML code is Uit

Forumnavigatie


Alle tijden zijn GMT +1. De tijd is nu 22:31.


Forum software: vBulletin 3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.