|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Home Directory...
What is the format for me to use that will take me to my root home directory.
I had some pages done and a change was done in the server that now none of my code works. So I am wondering if there is a structure I could use that would always take me to my home folder and I could use that always. Something like: /home Does this make sense? |
|
#2
|
|||
|
|||
|
RE: Home Directory...
if i understand correctly, i think this is what you mean
Code:
<a href="/">home</a> no matter what page your on, that should take you back to your root directory it can also be very usefull to specify image/css file paths begining with a /, so the file path is relevant to your site root, not the current directory for example, if your browser is at example.org/some/deep/dir/page.html and you want to link to an image at example.org/images/apple.jpg you can just link like this <img src="/images/apple.jpg"> that can be better than <img src="../../../images/apple.jpg"> because for one it easier to read imo, plus it wont break if you move your html file. |
|
#3
|
|||
|
|||
|
RE: Home Directory...
You are right on the ball with the problem I am encountering. I used to have "../../" in my code and if I move the files, they would break. So, I am trying to figure out a way to go to my home directory structure.
The sysadmin reorganized the folder structure in the server and my pages are now broken. And regardless of the code I try to implement, it still doesn't work. I tried what you mentioned and unfortunately did not have success. Problem is that the server where the files are has one main website. And there is 1 IP address on that server that hosts a different website, ours. Hopefully that made sense. So when I do the plain old "/" it takes me to the root level main site. I also have the same problem with my php includes. They give me the following error: Warning: main(): open_basedir restriction in effect. File(/stylesets/header.php) is not within the allowed path(s): (/webserver:/home:/tmp:/u01) in /webserver/htdocs/mia/daily_staff/daily_staff_input.php on line 45 The only way to bypass this that I could think is to include the full path of the files, but I want to avoid that so that I can easily move my files form location to location. Hopefully all this makes sense and you can give me an idea. |
|
#4
|
|||
|
|||
|
RE: Home Directory...
as for the html links, if your websites root folder is at
example.org/jweizenblut/ then code you links like this <img src="/jweizenblut/images/foo.jpg"> alternatively, you can make use of the html <base> tag <head> <base href="http://example.org/jweizenblut/"> </head> <img src="/images/foo.jpg"> as for the php side... also take a look at ini_set() for 'include_dir' |
|
#5
|
|||
|
|||
|
RE: Home Directory...
Cool. Worked. Thanks!
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Home Directory... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|