Jump to content

Problem with simple web page


superninja

Recommended Posts

Hi little buddies [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]
I have a small problem,i made a simple site,with header.html , footer.php and menu.php and index.php.
When i browse the site i launch this error:

[code]Warning: include(.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\xampp\xampp\htdocs\index.php on line 18

Warning: include() [function.include]: Failed opening '.php' for inclusion (include_path='.;C:\xampp\xampp\xampp\php\pear\') in C:\xampp\xampp\xampp\htdocs\index.php on line 18[/code]

Here is the index.php file

[code]<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<title>Увод в PHP - 5</title>
</head>
<body>
<?php
require("header.html");
?>
<table width="95%" cellspacing="15" cellpadding="5" border="0">
<tr><td valign="top" width="120">
<?php
require("menu.php")
?>
</td><td valign="top">
<?php
include ("p.html");
?>
</td></tr></table>
<?php
require("footer.php");
?>
</body>
</html>
[/code]

the header.html

[code]<h1 style="font:bold 2em sans-serif;color:#3300FF;text-align:center;">
My site
</h1> <br>
[/code]

the menu.php

[code]
<p align="center" style="font:bold 1em sans-serif;color:#000099">
<a href="index.php?p=main">main</a><br>
<a href="index.php?p=once">information</a><br>
</p>
[/code]

once.php

[code]
<h2 style="font:1.5em serif;color:#cc0000;">
Избягване на повторенията
</h2>
<p style="font:.9em sans-serif;color:#000000">
Понякога, при по-сложни включвания на файлове един в друг, може да се получи неколкократно повтаряне на кода на един и същи файл.
</p>
<p style="font:.9em sans-serif;color:#000000">
Това най- често води до грешки - или в обработката или в логиката на изпълнението..................
</p>
[/code]

and finally index.php

[code]
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<title>Увод в PHP - 5</title>
</head>
<body>
<?php
require("header.html");
?>
<table width="95%" cellspacing="15" cellpadding="5" border="0">
<tr><td valign="top" width="120">
<?php
require("menu.php")
?>
</td><td valign="top">
<?php
include ("p.php");
?>
</td></tr></table>
<?php
require("footer.php");
?>
</body>
</html>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/11861-problem-with-simple-web-page/
Share on other sites

[!--quoteo(post=383226:date=Jun 13 2006, 07:25 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 07:25 AM) [snapback]383226[/snapback][/div][div class=\'quotemain\'][!--quotec--]
where's p.html
[/quote]
Ops sorry that was a spelling mistake.its include ("p.php");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.