Something is wrong with the XAMPP installation :-(

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Something is wrong with the XAMPP installation :-(

Postby charm2013 » 11. March 2015 12:17

XAMPP 5.6.3
[PHP: 5.6.3]
OS: Windows 8.1
Code: Select all
<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/xampp/');
   exit;
?>
Something is wrong with the XAMPP installation :-(

Image
Please help me somethings wrong with the PHP ...
as you can see the image, when I call the index.php from htdocs on my browser, this happened..please help me.. thanks..
Image
while the HTML is working...
charm2013
 
Posts: 2
Joined: 11. March 2015 12:04
Operating System: Windows 8.1

Re: Something is wrong with the XAMPP installation :-(

Postby Nobbie » 11. March 2015 12:31

You have to learn a lot - HTML is interpreted by the browser, but PHP is NOT(!) interpreted by the browser, but by the Server (Apache/PHP). Therefore you cannot simply double click or open a PHP file in a browser, you must submit a valid URL in the browser, in your case http://localhost/index.php
Nobbie
 
Posts: 8758
Joined: 09. March 2008 13:04

Re: Something is wrong with the XAMPP installation :-(

Postby charm2013 » 12. March 2015 09:50

Nobbie wrote:You have to learn a lot - HTML is interpreted by the browser, but PHP is NOT(!) interpreted by the browser, but by the Server (Apache/PHP). Therefore you cannot simply double click or open a PHP file in a browser, you must submit a valid URL in the browser, in your case http://localhost/index.php

it's okay now.. thanks for the comment ! :)
charm2013
 
Posts: 2
Joined: 11. March 2015 12:04
Operating System: Windows 8.1


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 45 guests