HTML - Include Root Path Html?
Hey. I was wondering if this php code can be put into html?
HTML Code: include($phpbb_root_path . 'PATH' . $phpEx); Or is there some other html code with does that same job? Similar TutorialsHow do u specify the root folder in HTML without specifying an absolute address? (e.g. does "..//" mean root folder? I mean, like in ms-dos you could specify ..\\ to go back to the root folder) I'm building a menu by using php includes, e.g.: My index file contains: <?php include ('website/menu/titlelogo.html'); ?> In the titlelogo.html file, there is a link to titlelogo.jpg and lots of other stuff, from the perspective of the index file. It works fine until I change folder. Then of course, the stuff in the titlelogo.html is not from the perspective of the new folder. So I need to specify a root address to get around this. Absolute addresses aren't accepted for php (i.e. by absolute address I mean http://etc.) Please excuse me if I'm not describing this in the right terms. I come from a programming background, I'm only a basic html user. Its breaking my website, and no google searches have helped me find a solution! Anyone know how I can sovle this? Thanks Hi gurus, Excuse my rookie question. I am trying to build a small HTML page which has a formula in it . Please see attachement. Its something like: M = nth Root of ABC ----------------------------- - 1 _____________ XYZ I am trying some combinations of and √ but cannot make it work. Is there a way to do it other than using the image tag. THanks, KOn Hello there! I hope any HTML expert can assist me on the following matter: I am trying to place some rotating ads on my website. Those ads are located on the "ads.php" file. If my website was written in php I would know how to call that file with the function: <?php include("ads.php"); ?> Unfortunately, my website is in HTML (cannot be changed to PHP for other reasons) and I don't know any HTML function equivalent to the INCLUDE function for PHP. Does anyone know how could I call the ads.php file in HTML? Thank you! Hi, I was wondering if I could include some flash animation within the html on hover, Basically I needed to make the earth spin on http://www.aroundtheworldin80dishes.net only when the mouse is hovering over it thanks Greetings I don't understand php at all and i have page in HTML. Now i have this guestbook script that i would really much like to add to the html page, so what now? My apache server can handle php and everything in the server end is right, but when i put this in to my html page: include($path."comment.php"); Nothing happens, now i suspect that i need to turn the whole page in to PHP. However i don't know how to do this, could anyone tell me how do i turn this page to PHP and get it to work? What is the code i need to put in to my html page? Please help this is important to me, thank you inadvance! Turhamuro Hi people, I have two questions: Which is the tag to include other html file in a html file? Second question: How can I do in html a capital word? Thanks with anticipation. Regards I am just new, i just started HTML a week ago and pls help me. If you want to include a template file how do you do that inside a html page? I want to include a footer.dwt file inside my html file...... I want to implement the footer.dwt file for all the pages of website....so i just want to call the footer.dwt file below my html page...... Help? hi everyone this is my first page so i will probably have a couple of questions to help give me an idea of how to do that i want! basically someone has asked me to design them a site, i did a web design course but that was 6 months ago and i need to learn new things for it as well as try and remember what ive learned! ive got a semi basic layout, ill post the html and css, hopefully ill pate them in the right way (this definitely wont be the colour scheme, ive been following an online tutorial, want to get the layout right before making other tweaks) basically in the content section theyre looking for a rectangular box that has 4 imaes, 2 side by side and two below. these will change when theyre rolled over and when a particular image is clicked it will take them to the correct section of the site. as far as i understand from the css i have the size of the content section will change depending on how much information is there. how would i know what size to make the flash for insertion into this section so it fits properly without any gaps? sorry im a bit new to this but the more i learn the better! i dont have a clue how to actually code the flash yet but getting the size right would be a good start! thanks for your help HTML Code: <link rel="stylesheet" type="text/css" href="css/master.css" /> </head> <body> <div id="page-container"> <!--this div will hold all the other elements of the page--> <div id="main-nav">Main Nav</div> <div id="header"> <h1> Kilmaclolm Dramatic Society logo to be placed here </h1> </div> <div id="sidebar-a"> <dl class="hidden"> <dt id="about"><a href="#">About</a></dt> <dt id="services"><a href="#">Services</a></dt> <dt id="portfolio"><a href="#">Portfolio</a></dt> <dt id="contact"><a href="#">Contact Us</a></dt> </dl> </div> <div id="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam gravida enim ut risus. Praesent sapien purus, ultrices a, varius ac, suscipit ut, enim. Maecenas in lectus. Donec in sapien in nibh rutrum gravida. Sed ut mauris. Fusce malesuada enim vitae lacus euismod vulputate. Nullam rhoncus mauris ac metus. Maecenas vulputate aliquam odio. Duis scelerisque justo a pede. Nam augue lorem, semper at, porta eget, placerat eget, purus. Suspendisse mattis nunc vestibulum ligula. In hac habitasse platea dictumst. </div> <div id="footer"><!--floated divs dhould come first to avoid any IE issues--> <div id="altnav"> <a href="#">About</a> - <a href="#">Services</a> - <a href="#">Portfolio</a> - <a href="#">Contact Us</a> - <a href="#">Terms of Trade</a> </div> Copyright © Kilmacolm Dramatic Society. A website by D Keenan </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ html, body { /*resets the margins and padding on both the html and body tags to 0 to ensure theres no space between the top of the browser and the top of the page */ margin: 0; padding: 0; } h1 { margin: 0; /* takes away the default margin and padding on h1 tags */ padding: 0; } .hidden { display: none; /* any element with this class wont be seen on the site */ } #page-container { /* there is a # as this is an id, to be used once on the page only, not repeated elsewhere this div's height will change depending on the content*/ margin: auto; /* browser sets margin, should centre the div */ width: 760px; /* sets the width of the container */ } #main-nav { background: red; height: 50px; /* the width doesnt need to be specified, it will be 760px as this is the with of the containing div */ } #header { background: blue; height: 150px; } #sidebar-a { float: left; /* floats sidebar to left of the screen */ background: darkgreen; /*the height is dependend on the content so no height will be set for the time being*/ width: 280px; } #content { background: green; /*the height is dependend on the content so no height will be set for the time being*/ margin-left: 280px; /*creates a margin as wide as the sidebar to separate the sidebar information and the content */ } #footer { clear:both; /*When an element has the clear property assigned, if it comes into contact with a float it is placed right below where that float ends.*/ background: orange; height: 66px; } I'm a newbie and I need help with using the #include directive. below is a sample file usinging the #include directive: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <!-- #include file="test.html" --> </body> </html> Here is the contents of test.html: <h1>header</h1> When I display the test.html in my brower the text show up. When I run the main file above with the include statement the contents of the test file will not appear. I've tried using #include virtual and I get the same results. both files reside in the same directory. How can I get the above files to work. I'm working with windows XP on a home computer. This problem occured in my actual website files becasue I want to include a header and a footer. These files of course have table tags etc in them and I get the same results where the include files contents do appear. I need help asap if that is possible. Hi, I'm trying to include one HTML file in another. I tried iframe and was displeased with the results, I want the size of the frame to change dynamically and not just scroll. Fair warning, my knowledge of JavaScript is non-existent >_> . Basically, I have a document written in HTML (please don't suggest a wholesale re-write, that's simply not practical) and the idea is to have one file where it makes sense to include it several times. One thing to mention, this document is not meant to be shown on a web-server, but in a browser while you're reading it off your hard-drive. Here's what I have so far. main.shtml Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>test</title> </head> <body> <center> <h1> This is only a test! </h1> </center> <p> Still testing!!!!! </p> <!-- #include file="included.html" --> <p> Even more testing!!!!! </p> </body> </html> included.html Code: <!--<html> <head> <title> asdfasdfasdfasd </title> </head> <body>--> <p> <h4> foobar </h4> <br> <br> <br> <br> <h4> boofar </h4> </p> <!--</body> </html>--> Not sure what I'm doing wrong, help appreciated! How would you make a directory before the root. Apple.com for example if you click on store, it will go to store.apple.com I want to make a feature for iphones on my website, so that if an iphone is viewing it, it will be redirected to mobile.website.com or something like that. I dont know how to make the root before the website =/ Hi guys, I'm wondering if there is an easy way to provide links or image links to a file in the root directory of my domain. I know there's the "/" method but it will not do for me because I maintain the files offline on my PC, and if I used "/" then it will not refer correctly. Example: Code: <IMG SRC="/example.gif"> This will work 100% of the time when it's uploaded on the web, regardless of which directory the HTML file is at, I will still open the same "example.gif" at the root dir. Perfect. But since I'm maintaining the files offline (before uploading), this causes a problem as I will have numerous "broken links". FYI I even tried to map my folder to a drive (W, or placing the entire file system on a USB drive, but none of those work. I realise I could use Code: <IMG SRC="../../example.gif"> and so on, but shouldn't there be an easier method? Hello, NVM. solved, delete please. I have a little problem with my server, I know it is EASILY solved, but I don't know how. The pages work fine if they are in ROOT, like index.html in ROOT is fine, but when I make a new HTML in a subfolder, ROOT/folder/index.php All the coding messes up and cannot load the files from the root. E.G: My CSS is in my root, cssmovietick.css, this works fine for the php files in the root, but when I go into the sub folder, it cannot find it. Here is the code to find the CSS. Quote: <link href="cssmovietick.css" rel="stylesheet" type="text/css" /> I'm pretty sure you understand So here's the sitch: Our website, Watershedpdx.com, works from its outside IP address UNLESS you are inside our local area network. It's a Comcast issue, and their router seems unable to rout internal requests for our own IP from the internal and around to the router. I know I could modify the .hosts file on every computer and such, but for now, I've opted for a slightly different solution: If I'm inside the building, I check our own website with it's local IP: http://10.1.10.197 Now, the issue comes up because I'm streaming video to the web at http://10.1.10.197:8079 and http://10.1.10.197:8078 Is there a way to reference this in the code without the IP address? For this to be visible to the internet, I link it in the code as http://watershedpdx.com:8078 - but then the computers in the building can't see it. Is there a reference like http://..:8078 that would work? I'm trying to fix up my code a bit so all the files I'm pointing to are relative to the root of the site. Most of my links used to look something like this (all these link examples came from same file)... <link href="css/styles.css" type="text/css" rel="stylesheet"> <script src="scripts/jquery.min.js" type="text/javascript"></script> <?php include('includes/header.html');?> <img src="images/maps/pic1.jpg"> The above was fine as long as my site stayed small, with few pages all in same directory. However, bigger projects require pages in different folders, sometimes in subfolders, yet all these pages share certain characteristics - headers, footers, etc. So I need to start specifying links to those files relative to the root. Here are the same examples, but now starting from the root of my site. They all work, except for my includes. <link href=" / css/styles.css" type="text/css" rel="stylesheet"> <script src=" / scripts/jquery.min.js" type="text/javascript"></script> <?php include(' / includes/header.html');?> <img src=" / images/maps/pic1.jpg"> Any idea why the includes won't work? Works fine as long as I don't put that / in there. Hi all, Sorry for such an elementary question but up until now I have always used ../ for my references. So I don't have to duplicate code I decided to use ~/ for some referenced links and it doesn't seem to work. Get 404 on the requests. Ok.. what am I missing? Much thanks! s-one I am working on an ebook site and must provide it to a service that hosts ebooks and does marketing and other things for their clients beyond simply hosting. They have given me an instruction that I don't know what it means, and when I try it, it breaks my ability to preview the work I'm doing. I can only assume that whatever they're doing really needs it to be this way and that it won't truly be broken in their database. Btw, I'm building the individual pages and their database is linking the pages in the prev/next buttons. Here's the instruction: Make sure to label any links or images in a global, root-based manner, since once it's called on from within another folder the links will be broken if you do not. Example: img src="static/contact.jpg" SHOULD BE img src="/static/contact.jpg" What does it mean? Do I need to take any precautions not mentioned here? Sorry but any question I ask them just seems to baffle them and makes me wish I had never asked it. Thanks, Gary |