SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old January 18th, 2005, 09:12 PM
jweizenblut jweizenblut is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Miami, Fl. US
Posts: 522 jweizenblut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 29 sec
Reputation Power: 2
Send a message via AIM to jweizenblut Send a message via Yahoo to jweizenblut
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?

Reply With Quote
  #2  
Old January 19th, 2005, 05:48 AM
rehfeld_dot_us rehfeld_dot_us is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 825 rehfeld_dot_us User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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.

Reply With Quote
  #3  
Old January 19th, 2005, 05:07 PM
jweizenblut jweizenblut is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Miami, Fl. US
Posts: 522 jweizenblut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 29 sec
Reputation Power: 2
Send a message via AIM to jweizenblut Send a message via Yahoo to jweizenblut
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.



Reply With Quote
  #4  
Old January 19th, 2005, 11:07 PM
rehfeld_dot_us rehfeld_dot_us is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 825 rehfeld_dot_us User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
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...


php Code:
Original - php Code
  1.  
  2.  
  3. define ('SITE_ROOT', $_SERVER['DOCUMENT_ROOT'] . '/jweizenblut');
  4.  
  5. // then
  6.  
  7. include (SITE_ROOT . '/path/to script.php');
  8.  
  9.  



also take a look at ini_set() for 'include_dir'

Reply With Quote
  #5  
Old January 20th, 2005, 11:34 PM
jweizenblut jweizenblut is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Miami, Fl. US
Posts: 522 jweizenblut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 29 sec
Reputation Power: 2
Send a message via AIM to jweizenblut Send a message via Yahoo to jweizenblut
RE: Home Directory...

Cool. Worked. Thanks!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Home Directory...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway