Так что мой PHP проект вызывает localhost
, а также localhost/project/
загружает index.php
для проекта, а не загружая его, он загружает его как download
... вот download
файл:PHP XAMPP загрузив мой index.php вместо загрузки страницы
<?php
/*
* Index.php - Define the directories
*
*
* DS, DIRECTORY_SEPARATOR =/
* ROOT, dirname = string containing the path of a file or directory
* __FILE__ = The full path and filename of the file. If used inside an include, the name of the included file is returned
*
* In this file we load the apporpriate files that our website wants to load and render the
* template with informatio from the database. We load the bootstrap.php from the library folder.
*
* We are not including the ?\> to avoid injection of any extra whitespaces in our output.
*
*
*/
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(dirname(__FILE__)));
$url = $_GET['url'];
require_once (ROOT . DS . 'library' . DS . 'bootstrap.php');
и загрузка localhost
загрузок это:
<?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 :-(
Возможно, вы не загрузили модуль PHP для apache? – mash
Вы знаете, как загрузить это вручную на ubuntu? Я буду искать, чтобы попробовать – germainelol
Вы используете XAMPP на Ubuntu? Я имею в виду, материал от апачей? - они даже не могут получить собственный веб-сайт (или #META TITLE # должен быть фактическим титулом страницы?). Просто «sudo apt-get install apache2 php5 libapache2-mod-php5 mysql» и от вас ... – joerx