Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Biała strona w index.php
Wiktoorek
post 10.06.2018, 14:05:09
Post #1





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 10.06.2018

Ostrzeżenie: (10%)
X----


Tak jak w tytule mam plik index.php, a w nim proste polecenie ,, echo 'test'; " i wyświetla się biała strona. Co robić?
IP do strony: http://77.55.222.171/
Go to the top of the page
+Quote Post
Neutral
post 10.06.2018, 14:27:55
Post #2





Grupa: Zarejestrowani
Postów: 286
Pomógł: 46
Dołączył: 10.01.2016

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


Upewnij się, że edytujesz ten sam plik w tej samej ścieżce. Np. zamiast edycji tego htdocs/index.php, edytujesz to: htdocs/my_file/index.php.
Go to the top of the page
+Quote Post
Wiktoorek
post 10.06.2018, 14:39:36
Post #3





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 10.06.2018

Ostrzeżenie: (10%)
X----


Za bardzo nie rozumiem, mam VPS, na nim zainstalowane wszystko (wersja PHP to 7.0) i mam index.php w /var/www/html/

Ten post edytował Wiktoorek 10.06.2018, 14:40:01
Go to the top of the page
+Quote Post
Neutral
post 10.06.2018, 14:53:40
Post #4





Grupa: Zarejestrowani
Postów: 286
Pomógł: 46
Dołączył: 10.01.2016

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


Spróbuj tego:
https://www.codeproject.com/Questions/66425...ut-in-html-page .

Wejdź w konsolę i zobacz efekt.

Upewnij się, czy masz wszystko prawidłowo napisane, powinno być np. tak:

  1. <?php
  2. echo 'hello';
  3. ?>


, a nie tak:

<? php
echo 'hello';
?>


W tym link'u, co podałem sporo zostało opisane.

U Ciebie jest tak:



Ten post edytował Neutral 10.06.2018, 15:02:00
Go to the top of the page
+Quote Post
Wiktoorek
post 10.06.2018, 15:02:02
Post #5





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 10.06.2018

Ostrzeżenie: (10%)
X----


Teraz tylko kod mi się wyświetla

http://77.55.222.171/test.php
Go to the top of the page
+Quote Post
Neutral
post 10.06.2018, 15:06:53
Post #6





Grupa: Zarejestrowani
Postów: 286
Pomógł: 46
Dołączył: 10.01.2016

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


Server musi przeparsować zawartość tagu <?php // ... ?>, musisz mieć to odpowiednio skonfigurowane. Po za tym dalej coś źle robisz, bo masz wykomentowane tagi php.
Go to the top of the page
+Quote Post
Wiktoorek
post 10.06.2018, 15:11:27
Post #7





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 10.06.2018

Ostrzeżenie: (10%)
X----


Nadal nie działa :/


http://77.55.222.171/index.php
Go to the top of the page
+Quote Post
Neutral
post 10.06.2018, 15:17:07
Post #8





Grupa: Zarejestrowani
Postów: 286
Pomógł: 46
Dołączył: 10.01.2016

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


https://www.raspberrypi.org/forums/viewtopic.php?t=72833
https://serverfault.com/questions/288436/ph...n-my-vps/288439

Ten post edytował Neutral 10.06.2018, 15:22:29
Go to the top of the page
+Quote Post
Wiktoorek
post 10.06.2018, 15:21:24
Post #9





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 10.06.2018

Ostrzeżenie: (10%)
X----


Jesteś wielki! wystarczyło zainstalować libapache2, dziękuję i pozdrawiam
Go to the top of the page
+Quote Post
Neutral
post 10.06.2018, 15:23:01
Post #10





Grupa: Zarejestrowani
Postów: 286
Pomógł: 46
Dołączył: 10.01.2016

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


Tak właśnie myślałem, że źle skonfigurowałeś server.
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: 24.04.2024 - 23:40