HTML - How To Specify Root In Html?
How 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 Similar TutorialsHi 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 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? 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? 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 Hello, NVM. solved, delete please. 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 Hi, I'm running a personal server on my PC and have an image gallery script that serves up files outside of the root directory. I am trying to add image tags to folders on my hard drive and it will not display. If I go to the address directly, it shows up fine. Here's what I'm working with: <img src='file:///media/sda3/pic/toronto/beach000.jpg'> shows nothing but going to the address does. Anybody know what to do? 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? Hi all, I am trying to get the faveicon on my webpage. I have read some places that IE needs the image to be in the root folder of the web server. Is this true? Has anyone got it to work with the image in a different folder? The reason I ask is because I have some trouble accessing files in the root folder. If it is possible not to use it I would prefer to. Thanks in advance for any help, Jehan 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'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. Wicked simple question: I have three images located in my "images folder" My Top level looks like this -images- (folder) -party- (folder) index.html In my "party" folder I have a page called "events.html" and I need to know how to call an image in my "events.html" located on the top level folder "image" I know if i move the event.htmls to the top level I could call it by this: <img src="/images/picture1.gif"> However I DONT want to move the events.html, so how do I call the image? O and I am not looking for the answer : put the "http://www.sitename.com/images/" in the image tag ANY HELP THANKS!!!!! Hi all, I have a query that I hope somebody can help with as my site has been brought to a standstill because of this problem. I have just posted the new version of my site online and I have a folder below the domain root which contains things like database info, form scripts etc. When I process the form I get a 404 error. the action is something like HTML Code: action="../includes/process_form.php" There is no need to any output from these files as they process the information and direct to the relevant files above the domain root using php header scripts. At the beginning of most of my files I have the following PHP Code: <?php $security = 'secure'; require('../includes/default.php'); require('../includes/error_handlers.php'); require('../includes/db.php'); ?> and there is no problem with these whatsoever. I had all of the scripts working fine when I tested them at domainroot.co.uk/take2/public/ domainroot.co.uk/take2/includes/ Does anybody have any ideas why this is happening Any help would be appreciated John My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> I just upgraded all my .HTML pages to .PHP . But now I noticed that when my pages pull up in the search engines like Google, Yahoo, and MSN. They still show the old .HTML links?? When they click on the webpages from the search engines results you get error 404 page cannot be found. How can I update the search engines or add code to my page so the search engines will reflect the new .PHP pages. Also it's been over a good week since I've update to .PHP Thank you all in advanced!! Hi everyone, I've been searching around the web trying to find out how I can send using Outlook a html and text email newsletter automatically. I am quite happy creating html only newsletters, and text ones for that matter, but I have been digging and believe that by using multi-part code I can send to both and the recipients email client "allows" whichever version to be displayed - does this sound right? I'm hoping to simply create the html with the relevent mime references and boundaries (dont know what they are but have seen them on enough Google'd pages to know that they mean something!) and then copy and paste into Outlook - the newsletter is only going out to a few people at a time. Any suggestions or advice would be very greatly appreciated. Regards Allan Hi, so I'm trying to make this e-mail newsletter. It's entirely images, tables and text. So no javascript, just plain stuff. I tried attaching it as a signiture file and I had trouble sending it. It also didn't come out right. I'm trying to avoid using a software. Its basically just a block of HTML I need to show up as the only content in an email. If you just put HTML into a email text field, it just shows the HTML code in the email as text. Any ideas? As the title states I've been using Microsoft Word 2000 to create my web page but now want to make a simple no frills html HTML document. Is there a simple and quick way to do it ? I know I can simply create a new HTML document and then just copy and paste the links but is there a utility that can do this ? Many thanks I need a simple example to take input, and give an output, such as input: height weight output: body BMI thanks |