ZazouMiniWebServer est un superbe serveur léger et gratuit.
Pour la configuration, les définitions sont du genre :
Main:startpage=index.php;index.html;default.html
Ce qui se parse avec Rebol avec :
parse chaine [ copy contexte to ":" THRU ":" copy theme to "=" thru "=" copy var to end ]
rebol [] zmws_objcfg: [ Handler [] MimeType [] Main [] VirtualHost [] ] zmws_config: to-rebol-file "D:\Mes Documents\Programmation\ZMWS\ZMWS\_config.zmwsc.rebol" zmws_lines: read/lines zmws_config foreach line zmws_lines [ if all [ ; if error? try [ (line/1 <> #"#") find line ":" find line "=" (length? line) > 0 ; ][ ; false ; ] ][ li: trim first parse/all line "#" print li parse li [ copy contexte to ":" thru ":" copy theme to "=" thru "=" copy value to end ] append/only select zmws_objcfg to-word contexte to-block reduce [ theme value ] ] ] probe zmws_objcfg
Sa ka fèt = Comment va ? (créole)
Merci de passer sur mon petit bout de web
Read, Take, Share... Enjoy
--
Fabio (20090317)