Jump to content

Directry help


_simon_

Recommended Posts

I have coded my website in HTML, CSS and PHP.

 

I have a navigation menu then a sub headings menu

 

EXAMPLE:

 

Navigation menu says:  'BOOKS' once clicked you get a page with a  list of sub headers with book names 'THE MAN IN THE WHITE SUIT' and so on

 

all parts of my main website is in

 

dir/my_site/.....

 

what i want to do is make a directory for the links to put the sub headings in

 

example

 

dir/my_site/books/.........

 

I have put my navigation links in one file so that i can edit them in one file and it changes on all the web pages automatically. i link to the navigation page using the below code on each page.

 

<?php include("my_site/navigation.php"); ?>

 

Anyway, when i create a new directory called 'BOOKS' and put the file.php in there i get php errors.  and the only way i can seen to over come the errors is by removing all the php i have used in the file, but then i can not include /dir/my_site/navigation.php in the page because i have removed the php code.

 

 

Warning: include(my_site/navigation.php) [function.include]: failed to open stream: No such file or directory in /opt/lampp/htdocs/my_site/books/file.php on line 30

 

LINE 30 is :    <?php include("my_site/navigation.php"); ?>

 

and that code works on all other pages apart from the page that is in dir/my_site/books/file.php

 

and it also does not connect to my CSS page  ether.

 

all the files in dir/my_site/.... work fine and connect to all other files

 

but the file in dir/my_site/books/... does not connect to my CSS page or my navigation.php page

 

 

Any ideas ??

 

Cheers

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/263634-directry-help/
Share on other sites

  Quote
Warning: include(my_site/navigation.php) [function.include]: failed to open stream: No such file or directory in /opt/lampp/htdocs/my_site/books/file.php on line 30

 

LINE 30 is :    <?php include("my_site/navigation.php"); ?>

 

LINUX Server

 

Thank you for the reply

 

Link to comment
https://forums.phpfreaks.com/topic/263634-directry-help/#findComment-1351380
Share on other sites

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.