Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]problem z cronem
csharnas
post
Post #1





Grupa: Zarejestrowani
Postów: 49
Pomógł: 0
Dołączył: 28.02.2013

Ostrzeżenie: (0%)
-----


witam mam taki oto plik na serwerze gdy go uruchamiam wogóle sie nie odpala co może być tego przyczyną ?

  1. <?php
  2.  
  3. require_once('./config.php');
  4.  
  5. mysql_connect(HostMySQL, UserMySQL, PassMySQL);
  6. mysql_select_db(BaseMySQL);
  7.  
  8. $Query = mysql_query("SELECT `id` FROM server");
  9.  
  10. while($Return = mysql_fetch_array($Query))
  11. {
  12.  
  13. file_get_contents('http://adreswww/Cron/policz.php?id='.$Return['id'].'');
  14.  
  15. file_get_contents('http://adreswww/Cron/stworz.php?id='.$Return['id'].'');
  16.  
  17. }
  18.  
  19. ?>




Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
csharnas
post
Post #2





Grupa: Zarejestrowani
Postów: 49
Pomógł: 0
Dołączył: 28.02.2013

Ostrzeżenie: (0%)
-----


nadal nie działa tak to zmeiniłem plik cron.php

  1. <?php
  2.  
  3. require_once('./config.php');
  4. include('policz.php');
  5. mysql_connect(HostMySQL, UserMySQL, PassMySQL);
  6. mysql_select_db(BaseMySQL);
  7.  
  8. $Query = mysql_query("SELECT `id` FROM server");
  9.  
  10.  
  11.  
  12. ?>


a tak wyglada plik policz.php początek pliku zmieniłem $_GET na $_Return

  1. <?php
  2.  
  3. require_once("./class/halflife.class.php");
  4. require_once('./config.php');
  5.  
  6. mysql_connect(HostMySQL, UserMySQL, PassMySQL);
  7. mysql_select_db(BaseMySQL);
  8.  
  9. require_once('./function/ClearText.php');
  10.  
  11. $ID = ClearText($Return['id'];
  12.  
  13. $Query = mysql_query("SELECT `ip` FROM server WHERE id='$ID'");
  14. $Return = mysql_fetch_array($Query);
  15.  
  16. $IP = explode(':', $Return['ip']);
  17. $HL = new HalfLife($IP[0], $IP[1]);
  18.  
  19. $Info = $HL->details();
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.10.2025 - 07:40