FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » can't get includes to load
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: cleaning up first php page was Re: can't get includes to load [message #180999 is a reply to message #180996] Thu, 04 April 2013 12:57 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 4/4/2013 4:48 AM, Cal Dershowitz wrote:
> On 03/27/2013 01:06 AM, J.O. Aho wrote:
>> On 27/03/13 08:00, Cal Dershowitz wrote:
>
>>> What is a person supposed to do about the fact that if you just type in
>>> www.merrillpjensen.com , you get the old index.html? Should I just
>>> re-direct that to a php version?
>>
>> Delete the index.html and problem solved.
>
> Alright, well it takes me a couple weeks to catch up on the reading with
> this stuff, but I now have a php-written page that has some measure of
> functionality to it:
>
> http://www.merrillpjensen.com/
>
> I think task one might be populating the dummy links, and they work, so
> woo-hoo.
>
> With the nav links, they have to be populated such that their relative
> addresses are gonna work and herewith my next design head-scratcher.
>
> Q1) Am I correct to think that for my stage of the ballgame, I want to
> have a unique .css file to which all pages refer?
>

It depends on your site's needs. However, this has nothing to do with PHP.

> For ease of upload with Filezilla, I'd like to put it in the includes
> directory, which is a ways off from where I'd like to find it with my
> 'about' page:
>
> $ pwd
> /home/sites/migrate/php/php1/includes
> $ ls
> footer.php header.php nav.php sidebar.php style.css
> footer.php~ header.php~ nav.php~ sidebar.php~
> $ cd ..
> $ echo root document directory
> root document directory
> $ cd pages/
> $ cd about/
> $ cat index.php
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
> ...
>
> <link rel="stylesheet" type="text/css" href="style.css" media="screen" />
>
> What I thought I could get away with was the preliminary hack of copying
> and pasting style.css into that folder, but it's just not gonna work
> until I get the relative-addressing figured out.
>

Again, completely unrelated to PHP.

> Q2) How do I refer to a "first cousin once removed" file that is 2 up
> and one down in includes/ ?
>

Still unrelated to PHP.

> Q3) For lack of a better idea, I used the headers of my original
> index.php page for the one that will be in pages/about/ . How do I
> write this small, derivative page without requiring the browser to re-do
> everything it did to load the home page?
>
> For example, nothing is to change about headers, footers, nav, sidebar
> during this invocation.
>

Your PHP question is?

>>
>> Another case, as you seem to give out a link with index.* it can be good
>> to use the apache rewrite module to redirect those who try to access the
>> index.html file directly, in your .htaccess you could have something
>> like this:
>>
>> RewriteEngine On
>> RewriteBase /
>> RewriteRule ^index\.php$ /index.php [L]
>>
>> Haven't tested it, so in worst case you need to make some tiny changes.
>
> I wonder whether there's an analog between what you do with default and
> what you do with default-ssl:
>
> $ pwd
> /etc/apache2/sites-available
> $ ls
> default default~ default-ssl
> $ cat default-ssl
> <IfModule mod_ssl.c>
> <VirtualHost _default_:443>
> ServerAdmin webmaster@localhost
>
> DocumentRoot /var/www
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
> <Directory /var/www/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
>
> Notice the similarities with default. I haven't been able to wrap my
> head around ssl yet in this environment but don't want to get farther
> away from the php of it.

Then you might want to get back to PHP. This isn't it.

>>
>>
>>> Also taking any and all suggestions* on how to make this start looking
>>> like a webpage that you would show a client.
>>
>> You maybe want to look at a CMS and just make a theme for it and then
>> add on your own plugins to do things you want it to do and no one else
>> has already done, then you don't have to reinvent the wheel.
>>
>>
>
> CMS? plug-ins? Things I know only if different contexts.
>
> Thx for your comment,

http://www.lmgtfy.com/?q=cms

The Wikipedia article is quite interesting.

If you want to design websites, I would suggest you get some basic books
on HTML, Apache and PHP. They will help you immensely.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mysql dynamic binding and pass-by-ref deprecated
Next Topic: Java conferences in India...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 04:00:28 GMT 2024

Total time taken to generate the page: 0.04228 seconds