Mikus Posted May 2, 2006 Report Share Posted May 2, 2006 Es zinu kad loti iespejams shim lidzigs topic ir bet es to nevaru nekur atrast tapeec plzz kads pastastiet kaa lai es uzlieku pimeram es gribu lai man rada kad serveris online-online.gif un kad offline-offline.gif plzz man ljoti nepiecieshama juusu palidziba jo man tas skolas testa ir lojoti vajadzigs.... Link to comment Share on other sites More sharing options...
v3rb0 Posted May 2, 2006 Report Share Posted May 2, 2006 no http://lv.php.net/fsockopen pirmā piemēra <?php $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30); if (!$fp) { echo "<img src='offline.gif' />"; } else { echo "<img src='online.gif' />"; fclose($fp); } ?> Link to comment Share on other sites More sharing options...
Mikus Posted May 2, 2006 Author Report Share Posted May 2, 2006 liels paldies bet varbut tu ari zini kapee man rakstas kad error 6 rindaa echo "<img src='online.gif' />"; Link to comment Share on other sites More sharing options...
Kristabs Posted May 2, 2006 Report Share Posted May 2, 2006 Vidrīzāk, ka kļūda ir iepriekšējās rindas beigās. Raksti šādi: <?php if(){ ?> <img src='online.gif' /> <?php } ?> Labāk pārskatāms un vieglāk rediģējams html. Un šajā gadījumā zināsi, ka šajā rindā nav tā kļūda. P.S. Nākamreiz arī iepeisto error tekstu. Link to comment Share on other sites More sharing options...
Mikus Posted May 3, 2006 Author Report Share Posted May 3, 2006 Liels paldies par tavu palidzibu!! :D Link to comment Share on other sites More sharing options...
Mikus Posted May 3, 2006 Author Report Share Posted May 3, 2006 agghhhh.... atkal Error bet cits! Parse error: parse error in c:\appserv\www\images\index.php on line 3 if(){ Link to comment Share on other sites More sharing options...
Kavacky Posted May 3, 2006 Report Share Posted May 3, 2006 Iekavās kaut kas netrūkst, ne? Link to comment Share on other sites More sharing options...
Mikus Posted May 3, 2006 Author Report Share Posted May 3, 2006 zinu zinu pats tiko sapratu! :P a ka ir jadara lai man kad ir Offline tad rada offline bildi? visadi izmeginaju ar "else" bet nekas nesanak :( piem. <?phpif(87.110.12.182){ ?> <img src='online.gif' /> <?php } else { ?> <img src='offline.gif' /> <?php } ?> Link to comment Share on other sites More sharing options...
v3rb0 Posted May 3, 2006 Report Share Posted May 3, 2006 mans dotais gabals tieši ar rāda kā prasīji (un bez jebkādās kļūdas 6. rindā - pats kaut ko esi samuhļījis). copy/paste tukšā failā un apsties. Link to comment Share on other sites More sharing options...
Mikus Posted June 10, 2006 Author Report Share Posted June 10, 2006 nu tev ir taisniiba :D viss iet tik problema tada kad ir online rada bildi Online.gif bet kad ir offline rada bildi offline.gif un ari error kad envar piekonekteties! ludzu palidziet..... Link to comment Share on other sites More sharing options...
eglitis Posted June 10, 2006 Report Share Posted June 10, 2006 (edited) pirms fsockopen liec @ - @fsockopen. Vai arī slēdz error_reporting ārā. Edited June 10, 2006 by eglitis Link to comment Share on other sites More sharing options...
v3rb0 Posted June 10, 2006 Report Share Posted June 10, 2006 $fp = @fsockopen("www.example.com", 80, $errno, $errstr, 30); Link to comment Share on other sites More sharing options...
SkyD Posted June 10, 2006 Report Share Posted June 10, 2006 Jautājums man, kapēc jaliek @ priekšā. Dažreiz, ja nemaldos, arī liek pie include un mail. ?! Link to comment Share on other sites More sharing options...
bubu Posted June 10, 2006 Report Share Posted June 10, 2006 RTFM: http://www.php.net/manual/en/language.oper...rrorcontrol.php Link to comment Share on other sites More sharing options...
Mikus Posted June 16, 2006 Author Report Share Posted June 16, 2006 Nu liels lies jums paldies :D sanaca viss tiesi ka biju gribejis :) Lies paldies v3rb0 un parejiem! :D Link to comment Share on other sites More sharing options...
Recommended Posts