Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]Błąd PHP Parse error: syntax error, unexpected 'v31' (T_STRING) in /home/justskil/public_html/shop/initdata.php on line 29
Forum PHP.pl > Forum > Przedszkole
Matik21
Witam mam problem z kodem ponieważ nie generuje strony tylko wywala błąd: "Parse error: syntax error, unexpected 'v31' (T_STRING) in /home/justskil/public_html/shop/initdata.php on line 29"

Kod PHP:
  1. <?php
  2.  
  3.  
  4. if (!defined( '__SHOP__' )) {
  5.  
  6. exit( '' );
  7.  
  8. }
  9.  
  10.  
  11. define( 'VER', '3.1.6' );
  12.  
  13. define( 'SUB', '' );
  14.  
  15. define( 'STOPKA', '<a href=\'http://free-frags.pl/\' target=\'_blank\' title=\'sklep automatyczny do cs\'>Sklep Counter-Strike ver. ' . VER . SUB . '</a> ˆ <a href="http://free-frags.pl/user/1183-matik/" target="_blank" title="Sebastian \'Matik\' Komorek">Matik</a>' );
  16.  
  17. define( 'ACP', 'admin' );
  18.  
  19. define( 'PUB', 'public' );
  20.  
  21. define( 'KERNEL', 'kernel' );
  22.  
  23. define( 'STYLE', 'style' );
  24.  
  25. define( 'DS', DIRECTORY_SEPARATOR );
  26.  
  27. define( 'ROOT_PATH', str_replace( '\', DS, dirname( __FILE__ ) ) . DS );
  28.  
  29. define( 'v31', true );
  30.  
  31. define( 'v316', true );
  32.  
  33. define( 'KEY', 'w67G6YzxEJ' );
  34.  
  35. define( 'NO_LICENSE', 'TmllIHBvc2lhZGFzeiBsaWNlbmNqaSBkbGEgdGVqIHdlcnNqaSBza3J5cHR1Lg0KDQpKZcW8ZWxpIGpl
    c3RlxZsgYWRtaW5zdHJhdG9yZW0gaSBqZXN0ZcWbIGlubmVnbyB6ZGFuaWEgc2tvbnRha3R1aiBzacSZI
    HogYXV0b3JlbSBza3J5cHR1Lg0KDQpPZmljamFsbmUgZm9ydW06IGh0dHA6Ly9mb3J1bS5zaG9wLWVuZ2
    luZS5wbC8=' );
  36.  
  37. $list = array( 'localhost', '127.0.0.1' );
  38.  
  39. $ext_sms = array( 'wiaderko', 'ownserver', 'bizneshost', 'platnosci-online', 'justpay', 'cssetti' );
  40.  
  41. $ext_pay = array( );
  42.  
  43. $ext_mod = array( 'amxbans', 'zaawans_zezw' );
  44.  
  45.  
  46. if (( in_array( $_SERVER['HTTP_HOST'], $list ) || in_array( $_SERVER['REMOTE_ADDR'], $list ) )) {
  47.  
  48. @header( 'HTTP/1.1 500 Internal Server Error.' );
  49.  
  50. exit( );
  51.  
  52. }
  53.  
  54.  
  55. @require_once( ROOT_PATH . 'config.php' );
  56.  
  57.  
  58. if (!isset( $cfg['DEBUG'] )) {
  59.  
  60. $cfg['DEBUG'] = 0;
  61.  
  62. }
  63.  
  64.  
  65.  
  66. if (!isset( $cfg['ERROR_SQL'] )) {
  67.  
  68. $cfg['ERROR_SQL'] = 0;
  69.  
  70. }
  71.  
  72.  
  73.  
  74. if (!isset( $cfg['SHOW_SQL_QUERY'] )) {
  75.  
  76. $cfg['SHOW_SQL_QUERY'] = 0;
  77.  
  78. }
  79.  
  80.  
  81.  
  82. if (!isset( $cfg['SHOW_SQL_QUERY_IP'] )) {
  83.  
  84. $cfg['SHOW_SQL_QUERY_IP'] = '*';
  85.  
  86. }
  87.  
  88.  
  89.  
  90. if (!isset( $cfg['DEBUG_GG'] )) {
  91.  
  92. $cfg['DEBUG_GG'] = 0;
  93.  
  94. }
  95.  
  96.  
  97.  
  98. if (!isset( $cfg['ROOT'] )) {
  99.  
  100. $cfg['ROOT'] = 0;
  101.  
  102. }
  103.  
  104.  
  105.  
  106. if (isset( $cfg['shop_url'] )) {
  107.  
  108. if (substr( $cfg['shop_url'], -1, strlen( $cfg['shop_url'] ) - 1 ) == '/') {
  109.  
  110. $cfg['shop_url'] = substr( $cfg['shop_url'], 0, strlen( $cfg['shop_url'] ) - 1 );
  111.  
  112. }
  113.  
  114. }
  115.  
  116.  
  117. define( 'LOAD', '<img src="' . $cfg['shop_url'] . '/?img=load.gif" height="1" width="1">' );
  118.  
  119. define( 'AD', '<img src="' . $cfg['shop_url'] . '/?img=ad.gif" height="1" width="1">' );
  120.  
  121.  
  122. if ($cfg['DEBUG'] == true) {
  123.  
  124. (defined( 'E_DEPRECATED' ) ? error_reporting( 30719 & ~8192 ) : error_reporting( 30719 ));
  125.  
  126. ini_set( 'display_errors', 1 );
  127.  
  128. }
  129.  
  130. else {
  131.  
  132. ini_set( 'display_errors', 0 );
  133.  
  134. }
  135.  
  136.  
  137. date_default_timezone_set( 'Europe/Warsaw' );
  138.  
  139. setlocale( LC_TIME, 'pl_PL' );
  140.  
  141. @session_start( );
  142.  
  143. @ob_start( );
  144.  
  145. $path = ROOT_PATH . KERNEL . DS . 'class_Engine.php';
  146.  
  147.  
  148. if (@file_exists( $path )) {
  149.  
  150. require_once( $path );
  151.  
  152.  
  153. if (!class_exists( 'Engine' )) {
  154.  
  155. exit( 'Nie można odczytać pliku class_Engine.php' );
  156.  
  157. return 1;
  158.  
  159. }
  160.  
  161. }
  162.  
  163. else {
  164.  
  165. exit( 'Nie odnaleziono pliku class_Engine.php' );
  166.  
  167. }
  168.  
  169.  
  170. ?>
nospor
Apostrofy sie zamyka.... nawet kolorowanie na forum juz mowi ze tam masz źle....
Matik21
Mógłbyś podać gotowy kod?
nospor
W tej linii masz blad
define( 'ROOT_PATH', str_replace( '\', DS, dirname( __FILE__ ) ) . DS );
zwiazany z apostrofem.
Sam to pisales? \ to znak specjalny i musi byc poprzedzony \ czyli ma byc \\
Matik21
To nie jest moj kod.

Zrobiłem tak jak kazałeś i ta linijka wygląda tak: "define( 'ROOT_PATH', str_replace( '\\', DS, dirname( __FILE__ ) ) . DS );" lecz teraz strona jest cała biała
nospor
No, czyli tamten blad zostal naprawiony. Są jakies inne. ALe juz nie parse errory, skoro ich nie wyswietla. Ale jakie, to juz nie wiem
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.