bergsteiger wrote:Irgendwie reicht das alles bei mir nicht aus. Ich habe .phtml-Dateien, die php-Code enthalten. Normalerweise sollten die funktionieren, da die entsprechenden Eintragungen ja auch standardmäßig in den Conf-Dateien drin sind. Aber trotzdem versucht der Browser die .phtml-Dateien runterzuladen. Ich weiß, dass ich auch php-Dateien machen könnte (die funzen im Übrigen auch!) aber es muss doch dafür eine Lösung geben.
Gibts da was, das ich übersehen haben könnte?
Sicher sitzt der Fehler allerdings vor dem Bildschirm
Dieses ist ein Englisches Forum. Bedeuteten Sie, auf Deutsch bekanntzugeben?
The file extension
phtml seems to work just fine on my default 1.5.3a server.
To test I renamed
xampp/index.php to
index.phtml. It loaded just fine.
I had changed the httpd.conf file to reflect the new index.phtml in the
DirectoryIndex directive.
After changing the links to the frames in the index.phtml like this:
<?php
if (file_get_contents("lang.tmp") == "") {
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/splash.php');
exit;
}
include "langsettings.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang, Carsten Wiedmann">
<link rel="icon" href="img/xampp.ico">
<title><?php echo $TEXT['global-xampp']; ?> <?php include '.version'; ?></title>
</head>
<frameset rows="68,*" border="0" framespacing="0">
<frame name="head" src="head.phtml" frameborder="0" scrolling="no">
<frameset cols="175,*" border="0" framespacing="0">
<frame name="navi" src="navi.phtml" frameborder="0" scrolling="auto">
<frame name="content" src="start.phtml" frameborder="0" marginwidth="20">
</frameset>
</frameset>
</html>
the
XAMPP Welcome Page complete wih all the frames
.phtml files loaded perfectly.
So I don't see an issue with naming mixed php and html content to .phtml.
Neither do I see an issues with naming mixed php and html to .php.
If you have an issue with mixed php and html with a .html extension or you have a pure php file and you name it with a .html extension (apache will not render pure php in a .html extension file) then a rename or an httpd-xampp.conf edit is inevitable.