Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][ZenCart] Curl nie dziala
wozniak
post
Post #1





Grupa: Zarejestrowani
Postów: 278
Pomógł: 0
Dołączył: 21.11.2003

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


Witam, po zainstalowaniu zencarta podbno curl powinnien dzialac od razu a tutaj lipa. Znalazłem kod ktory jest chyba za to odpowiedzialny:
  1. <?php
  2. function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {
  3. global $request_type, $session_started, $http_domain, $https_domain;
  4. if (!zen_not_null($page)) {
  5. die('<br /><br /><strong class="note">Błąd!<br /><br />Nie można odnaleźć podanej strony!</strong><br /><br />');
  6. }
  7. if ($connection == 'NONSSL') {
  8. $link = HTTP_SERVER;
  9. } elseif ($connection == 'SSL') {
  10. if (ENABLE_SSL == 'true') {
  11. $link = HTTPS_SERVER ;
  12. } else {
  13. $link = HTTP_SERVER;
  14. }
  15. } else {
  16. die('<br /><br /><strong class="note">Błąd!<br /><br />Nieznana metoda połączenia!<br /><br />Znane metody: NONSSL SSL</strong><br /><br />');
  17. }
  18. if ($use_dir_ws_catalog) {
  19. if ($connection == 'SSL' && ENABLE_SSL == 'true') {
  20. $link .= DIR_WS_HTTPS_CATALOG;
  21. } else {
  22. $link .= DIR_WS_CATALOG;
  23. }
  24. }
  25. if (!$static) {
  26. if (zen_not_null($parameters)) {
  27. $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
  28. } else {
  29. $link .= 'index.php?main_page=' . $page;
  30. }
  31. } else {
  32. if (zen_not_null($parameters)) {
  33. $link .= $page . "?" . zen_output_string($parameters);
  34. } else {
  35. $link .= $page;
  36. }
  37. }
  38. $separator = '&';
  39.  
  40. while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
  41. // Add the session ID when moving from different HTTP and HTTPS servers, or when S
    ID is defined
  42. if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
  43. if (defined('SID') && zen_not_null(SID)) {
  44. $sid = SID;
  45. // } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL_ADMIN == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
  46. } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == 'true') ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
  47. if ($http_domain != $https_domain) {
  48. $sid = zen_session_name() . '=' . zen_session_id();
  49. }
  50. }
  51. }
  52.  
  53. // clean up the link before processing
  54. while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
  55. while (strstr($link, '&amp;&amp;')) $link = str_replace('&amp;&amp;', '&amp;', $link);
  56.  
  57. if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
  58. while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
  59.  
  60. $link = str_replace('&amp;', '/', $link);
  61. $link = str_replace('?', '/', $link);
  62. $link = str_replace('&', '/', $link);
  63. $link = str_replace('=', '/', $link);
  64.  
  65. $separator = '?';
  66. }
  67.  
  68. if (isset($sid)) {
  69. $link .= $separator . zen_output_string($sid);
  70. }
  71.  
  72. // clean up the link after processing
  73. while (strstr($link, '&amp;&amp;')) $link = str_replace('&amp;&amp;', '&amp;', $link);
  74.  
  75. $link = ereg_replace('&', '&amp;', $link);
  76. return $link;
  77. }
  78. ?>
Widzi ktos jakis błaD?

Ten post edytował wozniak 21.08.2007, 21:28:10
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
kicaj
post
Post #2





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

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


Jakis blad/komunikat dostajesz?
Go to the top of the page
+Quote Post
wozniak
post
Post #3





Grupa: Zarejestrowani
Postów: 278
Pomógł: 0
Dołączył: 21.11.2003

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


Niee, poprostu nie zmienia linków np. index.php?main_page=index&cPath=6
Go to the top of the page
+Quote Post

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: 23.08.2025 - 12:15