Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> zmienna "ord" w linku
xblant
post 8.02.2006, 14:45:01
Post #1





Grupa: Zarejestrowani
Postów: 76
Pomógł: 0
Dołączył: 31.01.2006

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


nie wiem czy to pytanie na to forum ale co oznacza cos takiego
  1. <?php
  2.  
  3. logs.php?date=08-02-2006&____ord____=1139405362
  4.  
  5. ?>

co to jest to "ord" i czy mozna to usunac ta liczba sie caly czas zmienia na koncu


--------------------
Go to the top of the page
+Quote Post
revyag
post 8.02.2006, 14:46:51
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 258
Pomógł: 16
Dołączył: 21.09.2004
Skąd: Kielce

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


Proszę przesłać do mnie na pw nową propozycję tematu topica. Do tego czasu zamykam.

-----
edit.
otwieram.


--------------------
-------------

------
Go to the top of the page
+Quote Post
Jabol
post 8.02.2006, 15:10:19
Post #3





Grupa: Przyjaciele php.pl
Postów: 1 467
Pomógł: 13
Dołączył: 22.02.2003

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


a teraz pytanie pomocnicze: o co chodzi?
W jakim kontekście występuje problem?
Go to the top of the page
+Quote Post
uroczy
post 8.02.2006, 15:26:33
Post #4





Grupa: Zarejestrowani
Postów: 90
Pomógł: 0
Dołączył: 3.02.2006
Skąd: Łódź

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


a reszta skryptu questionmark.gif bo to tylko część smile.gif


--------------------
.::::. |::::|
Go to the top of the page
+Quote Post
xblant
post 8.02.2006, 15:41:52
Post #5





Grupa: Zarejestrowani
Postów: 76
Pomógł: 0
Dołączył: 31.01.2006

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


to jest caly kod
  1. <?
  2. function logs($msg)
  3. {
  4. $url = "".$_SERVER['REQUEST_URI']."";
  5. $script_file = $_SERVER['SCRIPT_NAME'];
  6. if($_SERVER['QUERY_STRING']>' ')
  7. {
  8. $script_file .= '?'.$_SERVER['QUERY_STRING'];
  9. }
  10. if ($_SERVER["HTTP_X_FORWARDED_FOR"])
  11. {
  12. $ip=$_SERVER["HTTP_X_FORWARDED_FOR"];
  13. }
  14. if ($_SERVER["HTTP_CLIENT_IP"])
  15. {
  16. $ip = $_SERVER["HTTP_CLIENT_IP"];
  17. }
  18. else
  19. {
  20. $ip = $_SERVER["REMOTE_ADDR"];
  21. }
  22. $date = date("d-m-Y");
  23. $date2 = date("d.m.Y H:i:s");
  24. $file = "logs/".$date.".txt";
  25. if(!file_exists($file))
  26. {
  27. $handle = fopen($file, "x+");
  28. $data = "Co: \"".$msg."\", IP: \"".$ip."\", Plik: \"".$script_file."\", Url: \"".$url."\", Kiedy: \"".$date2."\".\n<br>";
  29. fputs($handle, $data);
  30. fclose($handle);
  31. }
  32. else if(file_exists($file))
  33. {
  34. $handle = fopen($file, "r");
  35. $old = fread($handle, filesize($file));
  36. fclose($handle);
  37. $data = "".$old."Co: \"".$msg."\", IP: \"".$ip."\", Plik: \"".$script_file."\", Url: \"".$url."\", Kiedy: \"".$date2."\".\n<br>";
  38. $handle = fopen($file, "w");
  39. fputs($handle, $data);
  40. fclose($handle);
  41. }
  42.  
  43. }
  44. function viev_log($date)
  45. {
  46. $file = "logs/".$date.".txt";
  47. $handle = fopen($file, "r");
  48. $log = fread($handle, filesize($file));
  49. fclose($handle);
  50. echo $log;
  51. }
  52. function viev_logs()
  53. {
  54. $directory="logs/";
  55. $dir=opendir($directory);
  56. $file_list="";
  57. while($file_name=readdir($dir))
  58. {
  59. if(($file_name!=".")&&($file_name!=".."))
  60. {
  61. $file_name = str_replace(".txt","",$file_name);
  62. $file_list.="<a href=\"logs.php?date=".$file_name."\">".$file_name."</a><br>";
  63. }
  64. }
  65. $file_list.="";
  66. closedir($dir);
  67. echo "
  68. Logi:<br>
  69. $file_list";
  70. }
  71. viev_logs();
  72. if(isset($date))
  73. {
  74. $date = str_replace("-",".",$date);
  75. echo "<br><br>Log z ".$date.":<br>";
  76. $date = str_replace(".","-",$date);
  77. viev_log($date);
  78. }
  79. if($co=t)
  80. {
  81. logs(404);
  82. }
  83. ?>

a chodzi o to ze do zmiennej "$url" i "$script_file" dodaje mi to "ord" i jakes liczby


--------------------
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 21.06.2025 - 22:55