monZy Posted May 6, 2005 Report Share Posted May 6, 2005 Taatad http://paste.php.lv/1927 esmu uzrakstiijis skriptu kursh ielogo failaa IP adreses, bet man vaig lai paarbauda, itkaa ir bet nesaprotu nah izmet erroru, Parse error: parse error, expecting `','' or `';'' in c:\program files\apache group\apache\htdocs\skyd.php on line 23 Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 6, 2005 Report Share Posted May 6, 2005 Taatad http://paste.php.lv/1927 esmu uzrakstiijis skriptu kursh ielogo failaa IP adreses, bet man vaig lai paarbauda, itkaa ir bet nesaprotu nah izmet erroru, Parse error: parse error, expecting `','' or `';'' in c:\program files\apache group\apache\htdocs\skyd.php on line 23 17237[/snapback] pats jau esi uzrakstijis atbildi :) apskaties ruupiigaak kodu..... P.S. biezji vien jaaskataas arii rindu vai vairakas zemaak tev aiz echo nav zemikola :) Link to comment Share on other sites More sharing options...
bubu Posted May 6, 2005 Report Share Posted May 6, 2005 Man nezkāpēc erroru rāda 20 rindā: PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in Z:\MOVIES\Anime\a.php on line 20 Link to comment Share on other sites More sharing options...
bubu Posted May 6, 2005 Report Share Posted May 6, 2005 tev aiz echo nav zemikola :) Kā nav semikola, ir tur semikoli visi takš. Link to comment Share on other sites More sharing options...
monZy Posted May 6, 2005 Author Report Share Posted May 6, 2005 tas pēdējais echo tur bija iemaldījies, to izdzēsu ārā, bet tāpatām pa to 23 rindu stāsta! Link to comment Share on other sites More sharing options...
monZy Posted May 6, 2005 Author Report Share Posted May 6, 2005 http://paste.php.lv/1929 tip tagadapsteis kodu bik pielaboju [20 rindu] , tikai nezinu kāpēc pa to 23 kautko saka Link to comment Share on other sites More sharing options...
bubu Posted May 6, 2005 Report Share Posted May 6, 2005 Neticu, ka šāda 20.rinda strādā: echo "Tava ip jau ir sarakstā,<br>Tu esi:" . $_SERVER['REMOTE_ADDR'] .; Pievērs uzmanību rindas pēdējiem 2 simboliem. Link to comment Share on other sites More sharing options...
monZy Posted May 6, 2005 Author Report Share Posted May 6, 2005 kolu nevajag, un to punktu arī nē? tos abus :blink: Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 7, 2005 Report Share Posted May 7, 2005 kolu nevajag, un to punktu arī nē? tos abus :blink: 17244[/snapback] jaa sajaa gadijumaa punktu nevajag - jo tu tachu vairaak neko klaat nevieno. zemikols noraada uz rindas / komandas beigaam tas ir nepiecieshams (starp citu es biju biskji nokljudijies ja tiktu lidz tam peedejam echo - kursh tagat ir iznjemts tad staastiitu ka kljuda ir naakamaa rindinjaa - sajaa gadijumaa, ja vien neseko php scripts - kljudu neuzraadiitu) Link to comment Share on other sites More sharing options...
GraaBeklis Posted May 7, 2005 Report Share Posted May 7, 2005 Nu man ir šitā: http://paste.php.lv/1930 Kļūda sekojoša: Warning: Wrong parameter count for fread() in d:\www\web\parbaude.php on line 24 Warning: Wrong parameter count for in_array() in d:\www\web\parbaude.php on line 25 Sveiks un paldies! Link to comment Share on other sites More sharing options...
monZy Posted May 7, 2005 Author Report Share Posted May 7, 2005 (edited) tas kods ir ljevijs, ievadiit IP vish ievada bet servera ip ne tavu! un kautko dirsh pa fread() Edited May 7, 2005 by monZy Link to comment Share on other sites More sharing options...
monZy Posted May 7, 2005 Author Report Share Posted May 7, 2005 Grābekli tātad n tev ir skripts beidzot pats izlaboju visu nebija nekur nekas tāds saliku . $tavs . punktos un viss aizgaaja un ar iekavaam pačakarējos tādat Graabekli vish visu ieraksta source te: Šeit Link to comment Share on other sites More sharing options...
GraaBeklis Posted May 7, 2005 Report Share Posted May 7, 2005 nu man vish neiet.. un ip.txt ieraksta no jauna, kad iejiet lapaa.. Link to comment Share on other sites More sharing options...
Lynx Posted May 7, 2005 Report Share Posted May 7, 2005 (edited) Eh, Monzy, tavs kods ir sasodīti nelasāms + neoptimizēts. Ko teiksiet par šādu variantu? <?PHP $fails = 'ip_adreses.txt'; if (!file_exists($fails)) { die('Kautkas neiet, tātad nevar notikt turpmākās darbības!;['); } $handle = file($fails); foreach($handle as $v) { if(preg_match('/'.$_SERVER['REMOTE_ADDR'].'/', $v)) { die('Tava ip jau ir saraksta'); } } //neliekam ieksh else, jo ja nebus neviena ieraksta failaa mes neko neierakstisim $rakstam = fopen($fails,'a'); fwrite($rakstam, $_SERVER['REMOTE_ADDR']."\r\n"); echo 'Sveiks un paldies!'; ?> Edited May 7, 2005 by Lynx Link to comment Share on other sites More sharing options...
GraaBeklis Posted May 7, 2005 Report Share Posted May 7, 2005 Vo.. shitas straadaa ka likts =]] pldies Tev Lynx Link to comment Share on other sites More sharing options...
Recommended Posts