|
| |
|
|
kitcar
Posts: 28 Joined: 2/13/2005 Status: offline
|
really dumb question - 4/17/2005 16:57:10
It's a dumb question but I'm still learning my way through css so don't shoot me please. Is there a way in a css file to have text appear globally in the html files, kind of like a global call or include? See, it's a dumb question. Don't ask why I want to do it, I'm just daydreaming. The short explanation is that I need to redo a site with many many pages that has shared borders and I need to get the shared borders out and creating a template html file would be cumbersome.
|
|
|
|
Kitka
Posts: 2515 Joined: 1/31/2002 From: Australia Status: offline
|
RE: really dumb question - 5/4/2005 15:55:41
quote:
The actual source of the page has 3 php includes. Does anyone know of a good but reasonably simple tutorial for php includes? I have a site which uses FP includes and I'd very much like convert it. I found this: http://us2.php.net/include/ but found it too technical for me to grasp.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Kitka
Posts: 2515 Joined: 1/31/2002 From: Australia Status: offline
|
RE: really dumb question - 5/4/2005 21:15:55
Many thanks for the reply Bobby. quote:
Make sense? Um, I think so. But I'll have to try it out to see if I can make it work before I'm certain.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Kitka
Posts: 2515 Joined: 1/31/2002 From: Australia Status: offline
|
RE: really dumb question - 5/5/2005 4:09:21
Okay, I've been testing. First I tried saving my left include as left.php then inserting the correct code as you mention above, on my test.htm page: <?php include("left.php"); ?> Didn't work. So I tried changing the file name to "left.htm", still no luck. So then I changed the test.htm to test.php, and bingo it worked! BUT ... only when viewed online in a browser. Even though I was working live on the server, FP refuses to show the php includes, in both Normal view and Preview. It isn't very satisfactory being unable to view the assembled page before saving/publishing like you can with FP includes or shared borders. Also, I am really aiming to not have to change the extension of all my many pages, mostly because of Search engine placings. I have edited the Apache "User Defined handler" supposedly to parse .htm and .html pages with php, but maybe I have got it all wrong? Here is what it says in Control Panel: User Defined Handlers .htm AddTypeapplication/x-httpd-php .html AddTypeapplication/x-httpd-php All help gratefully received, I'm feeling very confused.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Kitka
Posts: 2515 Joined: 1/31/2002 From: Australia Status: offline
|
RE: really dumb question - 5/5/2005 4:34:22
Okay, I finally figured there was something wrong with the syntax of handlers, so I Googled and found the following, which I added, and deleted the other 2. User Defined Handlers .htm .html application/x-httpd-php Now it works with .htm extension <phew>! The only problem is not being able to see the complete page in FP while editing. Is there a solution for that? (And PLEASE don't say "buy Dreamweaver", I can't afford it and am basically happy working in FP2002 and Notepad etc.)
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|