Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Biała strona w index.php
Wiktoorek
post
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
 
Start new topic
Odpowiedzi (1 - 9)
Neutral
post
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
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
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:

(IMG:https://image.ibb.co/fBiUDT/wrong_php.png)

Ten post edytował Neutral 10.06.2018, 15:02:00
Go to the top of the page
+Quote Post
Wiktoorek
post
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
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
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
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
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
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
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.12.2025 - 04:31