Zaloguj | Zarejestruj | FAQ

Hello World PHP problem

+ Odpowiedz

Posty: 3 Strona 1 z 1

Hello World PHP problem

przez shaunoneill52 » Wt wrz 20, 2016 11:48 am

Hi I am new to PHP and I am in need of some help. I loaded XAMPP successfully and started Apache and MySQL again without problems. After that the tutorial said to create a test file “test.php” to show that the “Hello World” worked on a browser – it did. But when I followed the tutorial example “my first page”
<title>My first PHP page</title>
echo "<h1>Hello World!</h1>";
This shows on the browser as Hello World!"; ?> and it also says that in the browser when you view source the PHP should be gone, which its not. So can someone tell me why the browser shows "; ?> at the end of Hello World and why the browser shows the PHP code?

Avatar użytkownika


  • Posty: 1
  • Dołączył(a): Wt wrz 20, 2016 11:30 am

Re: Hello World PHP problem

przez Farhin Qureshi » Pt sty 13, 2017 1:16 pm

The code you are running is absolutely fine. I have tried the same and it work correctly.You must check that whether you made mistake at some where in the file or not.
Avatar użytkownika

Farhin Qureshi

  • Posty: 45
  • Dołączył(a): Wt sty 03, 2017 11:33 am
Farhin Qureshi
.NET Developer

Re: Hello World PHP problem

przez nanoverso » So sty 14, 2017 4:20 pm

Looks very likely something has been typed wrong, check your source.
Avatar użytkownika


  • Posty: 253
  • Dołączył(a): So maja 10, 2014 12:08 am
  • Lokalizacja: Brazil

+ Odpowiedz

Strona 1 z 1