Upload script werkt niet door on2xs

Gestart doorHabwop8 reacties40 weergaven

9 berichten · pagina 1 van 1

Habwop

Lid · Topicstarter

Berichten
90
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mn topic die net maakte is nergens meer te vinden? Als dit niet geval is sory.
Ik heb een eigen upload script en die werkt aleen op een gratis host en niet op onxe2

dit is t script
[COLOR= #0000BB]<?[/COLOR] 
[COLOR= #FF8000]//Gegevens hier onder kun je veranderen[/COLOR]

[COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"images/"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//De map waar de fotos in komen[/COLOR]
[COLOR= #0000BB]$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"jpg, gif, png, bmp"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//Deze extensies die toegestaan zijn [/COLOR]
[COLOR= #0000BB]$max_size[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]150000[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//De maximale grootte van het bestand in bytes 

//Hieronder niks veranderen[/COLOR]

[URL="http://www.php.net/set_time_limit"]set_time_limit[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR] 

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]upload[/COLOR][COLOR= #007700]])) 
{[/COLOR] 
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/is_uploaded_file"]is_uploaded_file[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]])) 
    {[/COLOR] 
        [COLOR= #0000BB]$extensie_bestand[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/pathinfo"]pathinfo[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]);[/COLOR] 
        [COLOR= #0000BB]$extensie_bestand[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$extensie_bestand[/COLOR][COLOR= #007700][[/COLOR]extension[COLOR= #007700]];[/COLOR] 

        [COLOR= #0000BB]$extensies_toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]);[/COLOR] 

        [URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$extensies_toegestaan[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++) 
        {[/COLOR] 
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$extensies_toegestaan[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"$extensie_bestand"[/COLOR][COLOR= #007700]) 
            {[/COLOR] 
                [COLOR= #0000BB]$ok[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]; 
            } 
        }[/COLOR] 

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ok[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) 
        {[/COLOR] 
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]size[/COLOR][COLOR= #007700]]>[/COLOR][COLOR= #0000BB]$max_size[/COLOR][COLOR= #007700]) 
            {[/COLOR] 
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Het bestand is te groot, de maximale grootte is: <b>$max_size</b>"[/COLOR][COLOR= #007700];[/COLOR] 
                [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]; 
            }[/COLOR] 

            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/move_uploaded_file"]move_uploaded_file[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]],[/COLOR] 
            [COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]])) 
            {[/COLOR] 
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"het bestand kan niet worden verplaatst"[/COLOR][COLOR= #007700];[/COLOR] 
                [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]; 
            }[/COLOR] 

            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Het bestand "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" is geupload<br> 
            <a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" target=_blank>Klik hier om het te bekijken</a>
            </Br>
            <b>Url van je upgeloade plaatje: </b></br>
            <textarea>http://www.habwop.woelmuis.nl/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</textarea></br>
            <b>Html code voor je site:</b><br>
            <textarea><img alt="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" src=http://www.habwop.woelmuis.nl/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"></textarea><br>
            <b>Htlm code + link voor je site:</b><br>
            <textarea><a title="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"href=internet url hier><img alt="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" src=http://www.habwop.woelmuis.nl/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"></a></textarea><br>
            <b>HTML code + link voor je site:</b><br>
            <textarea>[url=hier het adres][img]http://www.habwop.woelmuis.nl/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" [/img][/url]</textarea><br>
            <b>Alleen code plaatje voor op een profiel/forum:</b><br>
            <textarea>[img]http://www.habwop.woelmuis.nl/"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$locatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bestand[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</textarea>
            "[/COLOR][COLOR= #007700]; 
        }[/COLOR] 
        [URL="http://www.php.net/else"]else[/URL] 
        [COLOR= #007700]{[/COLOR] 
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Verkeerde extentie, de toegestane extensies zijn: <b>$toegestaan</b>"[/COLOR][COLOR= #007700]; 
        } 
    }[/COLOR] 
    [URL="http://www.php.net/else"]else[/URL] 
    [COLOR= #007700]{[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Het uploaden is mislukt"[/COLOR][COLOR= #007700]; 
    } 

}[/COLOR] 

?> 
<br><br> 
<form method="post" action="<?=$_SERVER[PHP_SELF]?>" enctype="multipart/form-data"> 
<input type="file" name="bestand"><br> 
<input type="submit" name="upload" value="Upload je foto"> 
</form>


Ik vind wel jammer want phpmenno kan ook al niet op on2x , is wel zonde want heb veel geld voor de host betaalt
0
Habwop

Lid · Topicstarter

Berichten
90
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Dit moet in webwereld wink
Edit:
Dit is volgens mij je oude topic:
http://www.one2xs.com/threads/32031
Dat is een andere topic. Op gratis host werken die dingen wel en op een deze betaalde niet.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Heb je wel gecmod?

Dus de permissies 777 geven aan ut bestand
0
Habwop

Lid · Topicstarter

Berichten
90
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Heb je wel gecmod?

Dus de permissies 777 geven aan ut bestand
Wat denk je zelf? Ja natuurlijk. Anders zou die toch niet op die gratis host werken.
0
Berichten
2.609
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het ligt iig NIET aan one2xs
0
Marv

Lid

Berichten
3.092
Reputatie
1
Punten
0,21
Lid sinds
Laatst gezien
Nickjexx schreef:
Het licht iig NIET aan one2xs
Dat zijn jouw woorden? wink
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dit ligt zeker niet aan one2xs maar aan het script. Waarschijnlijk zit er toch ergens een fout die een gratis host negeert. In principe zouden alle scripts moeten werken, ook phpmenno, er zijn al verschillende leden geweest die die ook op hun host gehad hebben maar je moet zelf het script aanpassen omdat er bugs in zitten.

Kun je aangeven welke fout je script aangeeft dan is het wat makkelijker zoeken in je script.
0
Berichten
1.727
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Edit:// tijdverspilling.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren