ComeToLife
Jan 11 2006, 12:36 AM
| | For some reason I thought it was possible to have a url in the form of "../file.html" Meaning if you were at the page "http://www.site.com/stuff/main.html and there was a link in main.html that said "../file.html" it would take you to http://www.site.com/file.html Anyone know the proper syntax for this, or do I just need to put the full URL in place? It's a whole lot easier if I don't have to put the whole URL in place...because it makes ftping and editing from other locations SOOOO much more convenient. |
Reply
jlhaslip
Jan 11 2006, 12:56 AM
You are correct. The "../" tells the path to go up one directory. There can be multiple occurences, too, like "../../" to go up two levels. Do a Google on "relative links" because that is what they are. Also, search the forum here, because this has come up before. Also, on Apache servers there are "Server Absolute Links", but they aren't recognized on all servers, so use them carefully. Here is a link from our trap17 forums that might help. Relative Links - URLs
Reply
midnightvamp
Jan 11 2006, 02:56 AM
Yes, from what I know, the ../ is the correct way to put it. You just have to make sure that you do indeed have the file that you are calling in the folder one level up. ..... I had no idea that all servers don't recognise relative links. Is this something that I should be worried about when making them, or is this 'apache' server not what we use. I'm all confused, but what else is new lol...
Reply
Tyssen
Jan 11 2006, 03:12 AM
I hardly ever use relative links. I find absolute paths much easier to work with.
Reply
Tyssen
Jan 11 2006, 03:15 AM
Sorry for double posting but didn't read all of the original post properly the first time. QUOTE(ComeToLife @ Jan 11 2006, 10:36 AM) Anyone know the proper syntax for this, or do I just need to put the full URL in place? It's a whole lot easier if I don't have to put the whole URL in place.
To go with what I posted above about absolute paths, you don't have to type the full URL, just do this: /stuff/file.html.
Reply
jlhaslip
Jan 11 2006, 04:25 AM
Here is a sample file showing server absolute, relative, and absolute links. Jim's sample of linkinglDo a viiew source of test2-1 to see the worst case scenario. It can get ugly. Hope this helps some one.
Reply
Recent Queries:--
"go up one directory" php - 24.47 hr back. (1)
Similar Topics
Keywords : directory, url
- Unable To Replace .png File In Directory
Can't even delete it using Cpanel (7)
Directory Script
(1) Hello folks, i am thinking to create a new directory.So just want to know any good script
available?or anyone personally coded it? or any of the trap member have actually created directory?
i would like to view it. and ask few doubts that i have. please do reply to my query thanks in
advance people.....
Directory Restricted?
I can't edit one of my site's directories (7) My website is split into two directories: "site", which is my main site's content, and "forum",
which explains itself. The "site" directory is mostly filled with Joomla! files due to my
website using the Joomla! CMS. Previously, I was able to upload templates and extensions to
Joomla! without fail. However, since today whenever I've done either of these I just get
"failed" messages. Unable to source it to a problem with Joomla, I tried to access the directories
using FTP. I was able to access and rename all my directories using FTP, but whenever I t....
How To Display Images Of A Directory
(4) I am trying to do a simple thing. I want to display all the images of a directory on a single page
with the checkbox next to each image, so that i can select multi images and i can delete selected
images. Following few lines of code display the images of a directory.. i need help to put the
check boxes with each image. and I dont understand how can i select multi images with check box and
then delete them. I hope someone can help. thanks. CODE <?php $path = "./";
$dir_handle = @opendir($path) or die("Unable to open folde....
Php Ftp Upload Form
Adding User Directory to PHP Upload Form - Help (1) Alright I am trying to have a PHP FTP Upload Form that allows the user to create the directory
folder for where they want to upload there files to. example: Main Directory: vainsoft.com There
directory: vainsoft.com/modeling or vainsoft.com/photography But I dont want them to be able to
upload things into the main directory, only sub-directories, is that possible with this coding that
I have: //uses $_FILES global array //see manual for older PHP version info //This
function will be used to get the extension from the filename function get_extension($fi....
Where Do I Upload My Ftp Files? [resolved]
As in, which directory? (1) I recently got approved for hosting. I have an account right now, but I don't know which
directory to post my FTP stuff in. (I don't know if this is in support or not; the search
results didn't return anything.) I remember with my last host that had CPanel that you had to
upload it into the "public_html" folder. So I do that, or do I just upload it into the root
directory? Thanks in advance! (EDIT: Oh, never mind, it is /public_html.)....
Web's People Directory
(0) QUOTE While we've been working on bigsight for over a year now, it is only recently that
we've picked a final strategy, building the world's largest people directory. The company
started with an idea of building a targeted job board for the 24-31 y/o knowledge worker set. It
took only a few months for us to realize that the magic would be in first building a public
directory of those individuals. We thus went through a few iterations through Spring of '07
until, at the start of the summer, I decided that I wanted to do this full time. We closed an....
Pagerank Update Conclusions
Web Directory Owners special (1) Hi Guys, I have made a blog post relating the recent Google PageRank Update & some conclusions
that can be drawn from it. Small Excerpt. QUOTE Now here comes the pinch with this Google
Update when established directories (dropped by PR) and be compared with the new directories awarded
higher PR. I really don’t think PR now is the metric for comparison right now & will be influenced
with many other factors. Here are some of the conclusions that can be drawn from this PageRank
Update 1. Google is not against directories (I know that this will make a lot of people....
Google Sites And Services Directory
(0) QUOTE Google Search - http://www.google.com/ Google Image Search -
http://www.google.com/imghp Google Blog Search - http://blogsearch.google.com/ Google
Book Search - http://s.google.com/ Google Patent Search - http://www.google.com/patents
Google Product Search - http://www.google.com/products Google Experimental Search -
http://www.google.com/experimental/ Google Microsoft Search - http://www.google.com/microsoft
Google Bsd Search - http:www.google.com/bsd Google Linux Search -
http://www.google.com/linux ....
Unofficial Trap17 Hosted Members Directory
(13) This is the Trap17 edition of the Hosted Members Directory. A script initially written by me for the
Astahost forums. The script has gone through many a changes and is currently in version 4 which
includes the following features:- > Listing of hosted members. > Listing of the websites of the
hosted members. > Validation of the websites (whether the site is suspended, working or not not
working, etc) > Save/Load result to/from database. > Multithreaded for faster operation. > Status
messages, images and progress bar to keep you informed of the process. Link to the Scrip....
My Directory C'mon And Join
Do you want to join it? (0) I have started a directory site that I welcome all members of trap17 to join. The link to it is
http://www.gta-source.net/directory i started this as a network thing and now I welcome everybody
to join it, it'll help better promote your site, and your site gets ranked higher when it is
linked to other sites!! If you want to be apart of this, then post your links with a
description and I'll add it, then please post a link back to gta-source.net I dont want any
links to my directory, just to my site which i already said was gta-source.net. So come o....
Reading Files From Directory To Array, And Using $_get To Get Them
Simple way to manage lot's of files (2) Some user posted a similar problem i had when i tried to figure out how to update content on my
website in less work as possible. This is just part of the "big" plan i have for my site but it can
be helpfull to you guys if you like FlatFile. I hope that mod's don't mind me posting the
same code here and on their forums, couse if they do i'll delete it from their forums
/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> So
here's the situation. Let's say you have a folder called 'myfilesdirectory' on your
s....
Imagemagick Convert Directory
(0) I have some forums that use a word code during registration and GD isn't showing up right so I
was thinking about changing the system for ImageMagick and it says on the ComputingHost homepage
that ImageMagick is supported so I was just wondering what the convert directory is for it. Thank
You ....
Help Needed With Directory/file Listing Code Infinite Loop
Made an infinite loop but why is this so? (5) Hi all ive got a small and simple (for the moment atleast /unsure.gif"
style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> )file and directory
listing script in php as follows CODE $dir = "."; $num = 0; $file =
scandir($dir); while($file = scandir($dir)){ echo
$file[$num]; echo "<BR>"; $num = $num + 1;
}; the concept is simple enough, the directory to start with is the current one, so scan this
directory and wh....
Technorati -- A Blog Directory
The "Google" for blogs! (1) If you feel overwhelmed by the world of blogs, or if you just want to find out what people are
talking about, then this is the site for you. There are about 75000 new blogs created every day, and
about 1.2million posts every hour. This site tracks about 50million blogs, so you have it all at
your fingertips in one convenient location.....
Deep Linked Directory?
(0) I've heard about this directory that doesn't want your home pages, but your content pages
submitted to it. You can submit as many content pages as you like from your site, as long as they
are relevant to the categoy you are submitting to. Blog articles as well! The webmaster of the
site said: "Have fun, and submit now before word gets out and we are swamped. I anounced this on my
blog a short while ago this afternoon, and so far we have accepted 112 sites."
http://www.deeplylinked.com So what'd you all think? It sounds like a good idea but I think ....
Display Random File In A Directory
how to display a random file from a set directory. (9) hi, could someone please help me with this? I have some files in a directory and i want to know how
i can randomly display link/s to one or more of the files in my directory for download. But it must
not at any time display index.php which is also in the directory with the downloads. Thanks in
advance for any help given /unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0"
alt="unsure.gif" />....
Changin My Phpnuke Directory...please Help
(13) ok i wus fantastico to install my nuke...it asked me to give it a name for its directory so ive put
down "nuke" so to get to my site ud have to go to www.boaw.trap17.com/"nuke" but now i want to
change nuke into something else more related to the site...i was wondering if any1 can tell me the
best way to do that...thanks....
I Need Help To Use Htaccess To Allow Only My Server To See A Directory
(4) Hi everyone Ive finally got a bit of an opportunity to do some php coding for an organisation which
shouldnt be too hard. But i want to have some php files which will be used as includes in another
php script but for added protection i dont want these php files to be visible by the public. I know
i can use htaccess to easilly hide these files but what im worried about is will the head script be
able to see the includes it needs if the htaccess file is hiding the entire directory? Obviously
its no good if not even the local server can see its own scripts and i havent us....
How To Modify .htaccess To Protect A Directory?
(3) hi i have a free webhost included cpanel but it's cpanel is not full and i can not protect my
dir through it. then i think i should use .htaccess . now i dont how i must creat .htaccess files or
hoy to using it /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> can any one help me
pl....
Displaying Files Of A Directory
(2) I want to display the contents of a directory.. i have the following code.. It gives the output in
one column only... like file1 file2 file3 file4 . . . . . Since there are lot of files so this
column gets very long..i want to display the x number of files in each column.. like if there are 22
files.. then file 1 file 11 file 21 file 2 . file 22 file 3 .. . . . file 10
file 20 This was just an example..I know it can be done by using but i dont know how to do it
with loop. Please help me. QUOTE $dir = './'; $handle =....
Do You Have A Directory Website?
(0) HI, I'm looking for a few directories that allow free non-recip submissions so i can submit my
8 sites to them. Do you have a directory? Can you recommend one? I'd rather submit to a newer
dircetory and get my links up qucikly than wait 8 months to get a link on a more esteemed directory.
Thanks, Andy....
Review This Automotive Directory
www.autosmoto.com (5) Please tell your opinions about my site http://autosmoto.com .Any suggestion is appreciated.....
How To Make Money From A Directory
(3) Hi guys, I have a web directory and I would love to hear some suggestions on how to obtain a steady
revenue from the directory. I'm basically open to any suggestions.....
How To Protect A Directory From Being Viewed
without admin username and password (4) Well i ran across this script awhile back, and i am tired of storing it on my computer, so i am
going to post it here and whenever i need it i will come here and get it /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> hopefully Anyways, it is a
verry simple process just copy and paste this QUOTE if (($user) && ($passwort)) {
# get url $url = $DOCUMENT_ROOT . dirname($PHP_SELF) . "/.htpasswd"; # make
.htaccess and .htpasswd $htaccess_txt = "AuthType Basic" . "\n"; $htaccess....
Need Your Opinion On Which Template To Use In A Legal Directory And Information Website
Need your opinion on which template to use in a Legal directory and in (6) I'll be building a Law Website called LAWMATCHMAKER and is a Legal directory and information
portal,it also includes a forum where people can ask and answer legal questions. The website will be
designed to match people who have legal problems to the best possible solution for their individual
needs. I would like everyone to give me their openion on which template would be most suitable for
this website. Thanks in advance guys /biggrin.gif" style="vertical-align:middle" emoid=":D"
border="0" alt="biggrin.gif" />....
A Telephone Directory Source Code In C
(2) Well i had made this project some years before. It is a telephone directory which has a very good
User Interface operatable with scroll key. This code can be usefull in learning about file handling
and User Interface. CODE #include <stdio.h> #include <box.h> #include
<conio.h> #include <dos.h> #include <stdlib.h> #include <bios.h>
#include <graphics.h> FILE *fp; addnew2(char [],char []);
prnd(); deleteit(); info(); pl(); checkcmd();
showall(....
How To Sort Files Of A Directory using Php
(11) The following code displays the files of folder...but they are displaced by the order of adding... i
want to sord the files / folders alphabetically and sord by accending order and by decending
order.. can some one help me. $path = ""; $dir_handle = @opendir($path) or
die("Unable to open $path"); echo "Directory Listing of $path "; while($file =
readdir($dir_handle)) { if(is_dir($file)) { continue; } else
if($file != '.' && $file != '..') { echo " $fi....
Php Script To Make A Link List
From the list of the Directory Files (6) Well, it has been a while since I have added anything to the Tutorial Sectiion, so here is another
script for the members to enjoy. This one creates a list of links from the contents of the directory
which it is run from. For instance, if you run it from the public_html folder, then all the files
(not the Directores) are listed and linked so when you click on the link, that file is parsed and
output to the browser. Here is the code: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
An XHTML 1.0 Strict Page to List the files in this directory ....
Getting List Of Directories And Files Using Php
PHP Function for Directory and File List (6) is there a php function that lists the content of some folder.... example: /New folder new.txt
left.gif download.zip dc.exe ....so is there..? /rolleyes.gif' border='0'
style='vertical-align:middle' alt='rolleyes.gif' /> ....
Looking for directory, url
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for directory, url
*MORE FROM TRAP17.COM*
|
advertisement
|
|