plik.php
<?php for ($i = 2; $i <= 200; $i++) { //echo $tablica[$i]; $j = $i + 1; $tekst = "maxplayers"; if($tablica[2] == "maxplayers") else } ?>
config.txt
Kod
sv_lan 0
maxplayers 22
sv_visiblemaxplayers -1
exec banned.cfg
exec listip.cfg
hostname "Szambo"
mapchangecfgfile "server.cfg"
mapcyclefile "mapcycle.txt"
motdfile "motd.html"
servercfgfile "server.cfg"
sv_proxies 1
sv_region 3
fps_max 100
host_framerate 0
sys_ticrate 200
sv_maxrate 20000
sv_maxupdaterate 80
sv_minrate 0
sv_minupdaterate 10
sv_maxunlag 1
sv_password ""
//rcon_password "zupa"
sv_rcon_banpenalty 60
sv_rcon_minfailures 5
sv_rcon_minfailuretime 30
//plik konfiguracyjny dla serwera cs 1.6
maxplayers 22
sv_visiblemaxplayers -1
exec banned.cfg
exec listip.cfg
hostname "Szambo"
mapchangecfgfile "server.cfg"
mapcyclefile "mapcycle.txt"
motdfile "motd.html"
servercfgfile "server.cfg"
sv_proxies 1
sv_region 3
fps_max 100
host_framerate 0
sys_ticrate 200
sv_maxrate 20000
sv_maxupdaterate 80
sv_minrate 0
sv_minupdaterate 10
sv_maxunlag 1
sv_password ""
//rcon_password "zupa"
sv_rcon_banpenalty 60
sv_rcon_minfailures 5
sv_rcon_minfailuretime 30
//plik konfiguracyjny dla serwera cs 1.6
Ten skrypt ma miec takie zadanie:
Wczytac plik config.txt, rozlozyc go do tabeli po 1 wyrazie na komorke.
I ja chce sobie wyswietlac wartosci dla wybranych cravow z config.txt
W tej chwili mam ustawione szukadnie dla "maxplayers" w tablicy
No i problem jest tutaj taki że jak przeszukuję tablice to moj if nie znajduje w niej w zadnej komorce "maxplayers".
A jak np zamiast maxplayers wstawie jakas liczba tóra jest w config.txt to mi znajduje.
Może ktoś na to spojrzec swoim okiem? bo ja juz 2 h sie wpatruje i nic sensownego nie widze :-/