Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MYSQL] Syntax error - brak PHP5?
Lee
post
Post #1





Grupa: Zarejestrowani
Postów: 319
Pomógł: 0
Dołączył: 11.04.2006
Skąd: Chojnów

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


Mam problem otóż od jakiegoś czasu zamiast strony głównej dostaję komunikat
Cytat
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/gothic/public_html/library/mysql.class.php on line 4

PHP5 jest na serwerze (.htaccess - wgrałem jeszcze raz, ale bez skutku), plik wgrałem jeszcze raz, sprawdziłem bazę danych i nie mogę znaleźć źródła błędu. Nic nie zmieniałem w plikach od dłuższego czasu. Co powoduje ten błąd? Tu jest phpinfo
http://pass66.dizinc.com/~gothic/phpinfo.php
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Lee
post
Post #2





Grupa: Zarejestrowani
Postów: 319
Pomógł: 0
Dołączył: 11.04.2006
Skąd: Chojnów

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


library/mysql.class.php
  1. <?php
  2. class Connect {
  3. public $connect;
  4.  
  5. public function __construct($db_host, $db_name, $db_user, $db_pass) {
  6. @$this -> connect = mysql_connect($db_host, $db_user, $db_pass)
  7. or die (_MYSQL_ERROR_1 .''. mysql_error());
  8. @$this -> query = mysql_select_db("$db_name")
  9. or die (_MYSQL_ERROR_2 .''. mysql_error());
  10. $this -> query = mysql_query("SET NAMES latin2");
  11. }
  12.  
  13. public function __destruct() {
  14. @$this -> query = mysql_close($this -> connect);
  15. }
  16. }
  17. ?>

index.php
  1. <?php
  2.  
  3. require_once("config.php");
  4. $smarty->assign('links', fetch_weblink());
  5. require_once("news.php");
  6.  
  7. $smarty -> display("$theme/index.tpl");
  8.  
  9. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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: 5.10.2025 - 17:56