Search the Community
Showing results for tags 'includes'.
Found 4 results
how change include path on diffrent select option
PHP Include not workingThank you for your time. I am not sure where this really belongs the HTML, CSS, Application Design or one of the PHP topics. So I figured I would post here. In my search I have found topics that come close to my question but have not provided a fix for my issue. So I'm asking for help. That and I am a beggining Web Developer. Problem: the php includes I use are not displayed on web pages in subdirectories. If I add ../ to the php include so it is like this: <?php include ("../menu.php"); ?> on the newpage.php only some of the included files are shown on the page in the subdirectory. All links on the file newpage.php now act as though they were written <a href="../menu.php">link</a> and don't work. They are acctually written <a href="menu.php">link</a>. Directory & Files / index.php header.php footer.php menu.php <!-- contains all links for site --> style.css subdir/ newpage.php newpage.php include code <div id="links"> <?php include ("menu.php"); ?> </div> Question? How do I fix it so that the menu.php and other included files are shown on the subdir pages? How do I make the links properly reflect the location. Since absolute or relative pathing appears to muck it up. FYI: I do not have CLI access to the server. Only ftp access. Thanks again for any help you may provide.
Hi all, I have been perplexed for two days now, so I hope someone can shed some light on what I am doing wrong. The text says to: Then place header.html,footer.html, and style.css into the includes directory. I made an includes (new folder) directory in the webdocs folder that my school provides for the course. I ftped header, footer, styles to this location along with the index.php file. I put the header and footer inside the includes folder, as well as outside of the folder. Seems where ever I put it, the only thing that shows up in my browser is my index.php file without the header, footer, and .css files attached. I have restarted the whole project and did it again and I am still stuck. I think I need a new wording for the sentence? "Create an includes directory in the same folder as index.php." Folder structure is my weakness. Thank you for your help in advance!