Jump to content
php.lv forumi

*jancis38*

Reģistrētie lietotāji
  • Posts

    197
  • Joined

  • Last visited

Posts posted by *jancis38*

  1. <?php
    $bilde = file_exists('img/mapes/{map}.jpg' ) ? 'img/mapes/{map}.jpg' : 'img/off.jpg';
    echo '<img src="', $bilde, '" alt="bilde" /.';
    ?>

    Tas ir domāts CS servera monitoram, bet viņš ne vienu, ne otru neparāda, bildes ir savā vietā!

  2. Tikko uzinstalēju AppServ 2.5.9 versiju, startēju,

    eju iekšā lapā, un izmet tādu brīnumu:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\Web\www\index.php on line 6

    uz 6 rindiņas ir

    <?php include ("..."); ?>

    Kas būtu jādara, lai to novērstu?

  3. es mēģināju kko izvilkt no šitā skripta, bet nekas nesanāca. :/

    <?php
    $rip = $_SERVER['REMOTE_ADDR'];
    $sd  = time();
    $count = 1;
    $file1 = "txt.txt";
    $lines = file($file1);
    $line2 = "";
    foreach ($lines as $line_num => $line)
    {
    	$fp = strpos($line,'****');
    	$nam = substr($line,0,$fp);
    	$sp = strpos($line,'++++');
    	$val = substr($line,$fp+4,$sp-($fp+4));
    	$diff = $sd-$val;
    	if($diff < 300 && $nam != $rip)
    {
    $count = $count+1;
    $line2 = $line2.$line;
    }
    }
    $my = $rip."****".$sd."++++\n";
    $open1 = fopen($file1, "w");
    fwrite($open1,"$line2");
    fwrite($open1,"$my");
    fclose($open1);
    echo "$count";
    ?>

×
×
  • Create New...