CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

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 Dev Shed Forums Sponsor:
  #1  
Old July 28th, 2001, 02:47 PM
rtaylor rtaylor is offline
Chretien & Trudeau gone - Good
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Location: In a multi-cultural mess of failed peace-keepers.
Posts: 567 rtaylor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 8
Question require ("...css") OR <link href="...css" IF hidden directory

My html pages were at
/home/rtaylor/public_html/...

I have recently moved them to
/home/rtaylor/hidden_html/...

/home/rtaylor/public_html/search.php4
now contains a one line "shell"
require ("../hidden_html/search.php4");

This works OK if my stylesheet is accessed by
require ("../hidden_html/com.css");

------------

However, I had been using
<html><head>
<link rel="stylesheet" href="com.css" type="text/css">

When I switched, I tried

<html><head>
<link rel="stylesheet" href="../hidden_html/com.css" type="text/css">
AND
<link rel="stylesheet" href="html://www.isp.com/rtaylor/hidden_html/com.css" type="text/css">

I get the 404 error message.
I guess the browser can not access files outside the "public_html" directory.

I can use the original line --
<link rel="stylesheet" href="com.css" type="text/css">
but it means my source is in 2 places -
public_html for "com.css" and
hidden_html for all the rest.

Or I can use
require ("../hidden_html/com.css");
but I don't like it simply because all the style stuff shows via "View source".

I started with a vague question.
Now I have 2 options but don't like either.

Is there a third way?

Robert
__________________
Robert
---
If it's hard, it's probably wrong.

Reply With Quote
  #2  
Old July 30th, 2001, 01:58 PM
szarecor szarecor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: New York
Posts: 122 szarecor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Robert:

First off, it sounds like any problems could be fixed by changing the permissions on the directory in question - although I think the purpose of a dir named "hidden..." is probably to be be restrictive.

Secondly, If your html doc and your css doc are both in "hidden_html" (or did I misunderstand you?) why would you reference the css doc like this:

<link rel="stylesheet" href="../hidden_html/com.css" type="text/css">

rather than this:

<link rel="stylesheet" href="com.css" type="text/css">

Lastly, I wouldn't worry too much about people snatching your css via view source, if that is your concern. Just how valuable can a stylesheet be?

Hope this helps.

Reply With Quote
  #3  
Old July 31st, 2001, 11:09 AM
rtaylor rtaylor is offline
Chretien & Trudeau gone - Good
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Location: In a multi-cultural mess of failed peace-keepers.
Posts: 567 rtaylor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 8
szarecor,

You are right on several counts --

szarecor -- "I think the purpose of "hidden..." is probably to be be restrictive."
Robert -- Right.
---------------
szarecor -- "your html doc and your css doc are both in "hidden_html"
Robert -- Right.
---------------
szarecor -- "why would you reference the css doc like this:
<link rel="stylesheet" href="../hidden_html/com.css" type="text/css">
Robert -- Since public access starts in "public_html", I had to reference up 1 level,
then down into "hidden_html". I guess the "pwd" points to "public_html"

All my stuff is in "hidden_html" so I wanted my "css" stuff there also.
However, in my ignorance, I didn't realize that a browser, like any stranger,
can not normally access stuff outside of the "public_html" directory, thus,
<link href="../hidden_html/com.css"
can not work. So I switched to
require ("../hidden_html/com.css");
at the top of each php page.

----------------
szarecor -- "Lastly, I wouldn't worry too much about people snatching your css
via view source, if that is your concern. Just how valuable can a stylesheet be? "
Robert -- Right, mine has no value. I am a rookie at style sheets.
( On reflection, they may be a source of personal embarassment :cool
Seriously, I view source a lot, and just wanted the style sheet stuff out of sight.
---------------

I guess I will use the include method; then all my source is in one place.

Thanks for your post,

Robert

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > require ("...css") OR <link href="...css" IF hidden 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 6 hosted by Hostway