Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> Undefined offset: 0
teez
post 2.09.2012, 14:35:22
Post #1





Grupa: Zarejestrowani
Postów: 186
Pomógł: 6
Dołączył: 20.12.2010

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


Witam,

Mam następujący problem, po próbie wejścia na stronę wyskakuje mi takie coś :

  1. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  2. Call Stack
  3. # Time Memory Function Location
  4. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  5. 2 0.0046 360904 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  6. 123. /
  7.  
  8. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  9. Call Stack
  10. # Time Memory Function Location
  11. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  12. 2 0.0066 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  13. 124. /
  14.  
  15. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  16. Call Stack
  17. # Time Memory Function Location
  18. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  19. 2 0.0093 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  20. 125. /
  21.  
  22. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  23. Call Stack
  24. # Time Memory Function Location
  25. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  26. 2 0.0107 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  27. 126. /
  28.  
  29. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  30. Call Stack
  31. # Time Memory Function Location
  32. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  33. 2 0.0121 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  34. 127. /
  35.  
  36. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  37. Call Stack
  38. # Time Memory Function Location
  39. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  40. 2 0.0136 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  41. 128. /
  42.  
  43. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  44. Call Stack
  45. # Time Memory Function Location
  46. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  47. 2 0.0163 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  48. 129. /
  49.  
  50. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  51. Call Stack
  52. # Time Memory Function Location
  53. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  54. 2 0.0178 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  55. 130. /
  56.  
  57. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  58. Call Stack
  59. # Time Memory Function Location
  60. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  61. 2 0.0192 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  62. 131. /
  63.  
  64. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  65. Call Stack
  66. # Time Memory Function Location
  67. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  68. 2 0.0206 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  69. 132. /
  70.  
  71. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  72. Call Stack
  73. # Time Memory Function Location
  74. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  75. 2 0.0236 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  76. 133. /
  77.  
  78. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  79. Call Stack
  80. # Time Memory Function Location
  81. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  82. 2 0.0252 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  83. 134. /
  84.  
  85. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  86. Call Stack
  87. # Time Memory Function Location
  88. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  89. 2 0.0269 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  90. 135. /
  91.  
  92. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  93. Call Stack
  94. # Time Memory Function Location
  95. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  96. 2 0.0284 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  97. 136. /
  98.  
  99. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  100. Call Stack
  101. # Time Memory Function Location
  102. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  103. 2 0.0320 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  104. 137. /
  105.  
  106. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  107. Call Stack
  108. # Time Memory Function Location
  109. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  110. 2 0.0335 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  111. 138. /
  112.  
  113. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  114. Call Stack
  115. # Time Memory Function Location
  116. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  117. 2 0.0349 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15
  118. 139. /
  119.  
  120. ( ! ) Notice: Undefined offset: 0 in C:\Program Files\VertrigoServ\www\automat\cms.php on line 29
  121. Call Stack
  122. # Time Memory Function Location
  123. 1 0.0007 336952 {main}( ) ..\checkbox.php:0
  124. 2 0.0364 362760 include( 'C:\Program Files\VertrigoServ\www\automat\cms.php' ) ..\checkbox.php:15



I tak dalej..
Tutaj kod :

  1. <?php
  2. $f['username'] = 'login';
  3. $f['password'] = 'haslo';
  4. $f['redirect'] = '';
  5. $f['login'] = 'Zaloguj';
  6. $tytul = $_POST['tytul'];
  7. $message = $_POST['opis'];
  8. $l = $link . '/login.php';
  9.  
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  12. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  13. curl_setopt($ch, CURLOPT_URL, $l);
  14. curl_setopt($ch, CURLOPT_POST, 1);
  15. curl_setopt($ch, CURLOPT_POSTFIELDS, $f);
  16. curl_setopt($ch,CURLOPT_FOLLOWLOCATION, 1);
  17. curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookies.txt');
  18. curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookies.txt');
  19. curl_exec($ch);
  20.  
  21.  
  22. curl_setopt($ch, CURLOPT_URL, "$temat");
  23. curl_setopt($ch, CURLOPT_POSTFIELDS, "&subject=$tytul&t=$message&mode=newtopic&message=".urlencode($message)."&post=Submit");
  24. $result = curl_exec($ch);
  25. $pattern = '#<a href="(.*?)">Tutaj</a>#';
  26. $ile = preg_match_all($pattern, $result, $matches, PREG_PATTERN_ORDER);
  27. //print_r($matches);
  28. //echo $matches[1][0];
  29. $zwrot = $link . '/' . $matches[1][0];
  30. echo "$i. $zwrot <br>";
  31.  
  32. curl_close($ch);
  33.  
  34. //preg_match('#<a href="(.*?)">Tutaj</a>#', $adres, $link);
  35. //echo $link[1];
  36. //print_r($link);
  37.  
  38. //echo $result;
  39.  
  40.  
  41. ?>
Go to the top of the page
+Quote Post
pamil
post 2.09.2012, 19:56:09
Post #2





Grupa: Zarejestrowani
Postów: 97
Pomógł: 15
Dołączył: 12.08.2012
Skąd: Zabrze

Ostrzeżenie: (10%)
X----


Forum to nie parser.
Go to the top of the page
+Quote Post
teez
post 2.09.2012, 20:14:22
Post #3





Grupa: Zarejestrowani
Postów: 186
Pomógł: 6
Dołączył: 20.12.2010

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


Ok, dzięki za pomoc.
Go to the top of the page
+Quote Post
scanner
post 2.09.2012, 20:32:19
Post #4





Grupa: Zarząd
Postów: 3 503
Pomógł: 28
Dołączył: 17.10.2002
Skąd: Wrocław




Takie błędy poprawia się samodzielnie. Początkujący dla ułatwienia korzystają z RTFM.
Zamykam.


--------------------
scanner.info
Warto pamiętać: KISS, DRY
Go to the top of the page
+Quote Post

Closed 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: 19.07.2025 - 09:00