Jump to content


Photo

Problem with simple web page


  • Please log in to reply
5 replies to this topic

#1 superninja

superninja
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 June 2006 - 12:20 PM

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:

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

Here is the index.php file

<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> 

the header.html

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

the menu.php

<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> 

once.php

<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> 

and finally index.php

<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> 


#2 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 13 June 2006 - 12:25 PM

where's p.html
z..z..z..z..z..z..z..z..

#3 superninja

superninja
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 June 2006 - 12:33 PM

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

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 13 June 2006 - 12:58 PM

sounds to me like your not pointing the includes to the right filepaths, make sure they match, it's telling you it can't find them.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 mark s

mark s
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 13 June 2006 - 02:10 PM

require("menu.php")

looks like its missing a ; at the end too.

#6 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 13 June 2006 - 02:14 PM

Youfound that problem it looks like, good eye.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users