Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Problem - przeglądarka nie czyta poprawnie pliku index.php
MateuszekCo
post 26.09.2019, 13:23:56
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 26.09.2019

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


Witam,


Jestem bardzo zielony w temacie i mam taki problem: w pliku index.php mam cały kod strony:

  1. <?php $main = true ; ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  3. "http://www.w3.org/TR/html4/strict.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  7. <link rel="icon" type="image/x-icon" href="img/favicon.ico" />
  8. <?php
  9. require_once('engine/base.class.php') ;
  10. $action = @$_GET['page'] ;
  11. $id = @$_GET['id'] ;
  12. if(isset($_GET['lang']))
  13. $lang = $_GET['lang'] ;
  14. else
  15. $lang = 'PL' ;
  16.  
  17. .....
  18. .....
  19. .....
  20.  
  21. else if($action == 'cat')
  22. {
  23. $link = Base::connect() ;
  24. $q = 'SELECT `name` FROM `tree` WHERE `id` = :id LIMIT 1' ;
  25.  
  26. $link = Base::connect() ;
  27.  
  28. $result = $link->prepare($q) ;
  29. $result->bindValue(':id', $id, PDO::PARAM_STR) ;
  30. $result->execute() ;
  31.  
  32. $data = $result->fetch() ;
  33. $data['desc'] = $data['name'] ;
  34. $data['keywords'] = $data['name'] ;
  35. }
  36. ?>
  37.  
  38. <title>Auto Gaz Technik - <?php echo $data['desc']; ?></title>
  39. <meta name="description" content="<?php echo $data['desc']; ?>" >
  40. <meta name="keywords" content="<?php echo $data['keywords']; ?>" >
  41. <link href="styl.css" rel="stylesheet" type="text/css" >
  42. <link rel="stylesheet" type="text/css" href="jqueryslidemenu.css" >
  43. <script type="text/javascript">


I w przeglądarce pojawia się tylko pierwsza część HTML, reszta jest ignorowana.

Kod wyświetlany w przeglądarce:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <link rel="icon" type="image/x-icon" href="img/favicon.ico" />


Wszystko jest wrzucone na serwery nazwy.pl, nie jestem w stanie sobie z tym poradzić. Dodam jeszcze że wcześniej wszystko dobrze działało facepalmxd.gif .

Ten post edytował MateuszekCo 26.09.2019, 15:14:17
Go to the top of the page
+Quote Post
viking
post 26.09.2019, 14:02:36
Post #2





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Uruchom źródło strony i zobacz czy tam nie ma kodu.


--------------------
Go to the top of the page
+Quote Post
MateuszekCo
post 26.09.2019, 14:18:37
Post #3





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 26.09.2019

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


Cytat(viking @ 26.09.2019, 15:02:36 ) *
Uruchom źródło strony i zobacz czy tam nie ma kodu.



Niestety nie ma, jest tylko to co wklejałem wcześniej

Z panelu admina włączyłem opcje display_errors i takie coś wyskoczyło na stronie:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user
'gaztechnik'@'------------' (using password: YES)' in /home/------------/ftp/test/engine/base.class.php:23

Stack trace:
#0 /home/------------/ftp/test/engine/base.class.php(23): PDO->__construct('mysql:host=sql....', 'gaztechnik', 'Wasada02020')
#1 /home/------------/ftp/test/index.php(21): Base::connect()
#2 {main} thrown in /home/-----------/ftp/test/engine/base.class.php on line 23

Szukałem troche na necie ale nic nie moge znaleźć sensownego

Ten post edytował MateuszekCo 26.09.2019, 15:11:30
Go to the top of the page
+Quote Post
viking
post 26.09.2019, 14:35:46
Post #4





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Nieprawidłowe dane logowania do bazy.


--------------------
Go to the top of the page
+Quote Post
MateuszekCo
post 26.09.2019, 14:44:14
Post #5





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 26.09.2019

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


Czyli jak to można ogranąć? ohno-smiley.gif

Ten post edytował MateuszekCo 26.09.2019, 14:45:42
Go to the top of the page
+Quote Post
viking
post 26.09.2019, 15:06:38
Post #6





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Podać prawidłowe?
Swoją drogą zmień hasło skoro i tak wróciłeś je wszystkim na forum razem z userem.

Ten post edytował viking 26.09.2019, 15:07:52


--------------------
Go to the top of the page
+Quote Post
MateuszekCo
post 26.09.2019, 15:13:11
Post #7





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 26.09.2019

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


No głupi jestem, dziękuje bardzo. rolleyes.gif

Ten post edytował MateuszekCo 26.09.2019, 15:15:44
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: 23.04.2024 - 17:07