Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]punbb i łączenie z inną stroną
kavillock
post 14.10.2009, 16:18:16
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 25.09.2009

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


znalazłem gdzieś na forum jak połączyć punbb z własną stroną (formularz logowania)

lecz wywala błąd

Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\dom\Moje dokumenty\site\forum2.php:6) in C:\Documents and Settings\dom\Moje dokumenty\site\forum\include\functions.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\dom\Moje dokumenty\site\forum2.php:6) in C:\Documents and Settings\dom\Moje dokumenty\site\forum\include\functions.php on line 155


kod

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. </head>
  5. <body bgcolor="#1E1E1E">
  6. <?
  7. // Define the path to the forum root
  8. @define('FORUM_ROOT', 'forum/');
  9. require FORUM_ROOT.'include/common.php';
  10.  
  11. // Where will we go after login?
  12. $forum_page['redirect_url'] = 'http://localhost/forum';
  13.  
  14. $forum_page['form_action'] = forum_link($forum_url['login']);
  15.  
  16. $forum_page['hidden_fields'] = array(
  17. 'form_sent' => '<input type="hidden" name="form_sent" value="1" />',
  18. 'redirect_url' => '<input type="hidden" name="redirect_url" value="'.forum_htmlencode($forum_page['redirect_url']).'" />',
  19. 'csrf_token' => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />'
  20. );
  21.  
  22. ?>
  23. <form method="post" action="<?php echo $forum_page['form_action'] ?>">
  24. <?php echo implode("\n\t\t", $forum_page['hidden_fields'])."\n" ?>
  25.  
  26. Username:
  27. <input type="text" id="fld1" name="req_username" value="" />
  28. <br />
  29.  
  30. <input type="hidden" id="fld2" name="req_password" value="asdf" />
  31.  
  32. <input type="checkbox" id="fld3" name="save_pass" value="1" />
  33. <label for="fld3">Log me in automatically each time I visit.</label>
  34. <br />
  35.  
  36. <input type="submit" name="login" value="Login" />
  37. </form>
  38. </body>
  39. </html>


Go to the top of the page
+Quote Post
jmail
post 14.10.2009, 16:19:48
Post #2





Grupa: Zarejestrowani
Postów: 352
Pomógł: 53
Dołączył: 10.08.2009

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


no to nam chyba za dużo nie pomoże. trzeba znaleźć w którym miejscu jest wywoływana funkcje header() bo to o nią chodzi i zrobić tak, żeby przed nią nic nie mogło być wysłane do przeglądarki. Było wiele razy na forum - poszukaj
Go to the top of the page
+Quote Post
kavillock
post 14.10.2009, 16:21:29
Post #3





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 25.09.2009

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


szukałem, funkcje header usunąłem bo byla niepotrzebna natomiast zostało jeszcze:


  1. if (version_compare(PHP_VERSION, '5.2.0', '>='))
  2. setcookie($name, $value, $expire, $cookie_path, $cookie_domain, $cookie_secure, true);
  3. else
  4. setcookie($name, $value, $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);
  5. }
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: 15.07.2025 - 18:15