Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8856 > unrolled thread

can't get includes to load

Started byCal Dershowitz <cal@example.invalid>
First post2013-03-25 23:52 -0700
Last post2013-03-27 09:08 +0100
Articles 2 on this page of 22 — 5 participants

Back to article view | Back to comp.lang.php


Contents

  can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-25 23:52 -0700
    Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-26 09:36 +0100
      Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-26 14:50 -0700
        Re: can't get  includes to load Jim Higgins <ILikeMy@Privacy.bogus> - 2013-03-27 02:14 +0000
          Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 07:53 +0100
            Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-27 02:35 -0700
              Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 11:00 +0100
                Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 11:03 +0100
                Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-28 00:17 -0700
                  Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-28 08:35 +0100
                  Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-28 00:41 -0700
                    Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-28 09:34 +0100
                      Re: Git (Was: can't get  includes to load) Cal Dershowitz <cal@example.invalid> - 2013-03-29 00:28 -0700
                        Re: Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-29 13:14 +0100
                          Re: Git (Was: can't get  includes to load) Cal Dershowitz <cal@example.invalid> - 2013-03-31 00:31 -0700
                            Re: Git (Was: can't get  includes to load) "J.O. Aho" <user@example.net> - 2013-03-31 11:54 +0200
          cleaning up first php page was Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-03-27 00:00 -0700
            Re: cleaning up first php page was Re: can't get  includes to load "J.O. Aho" <user@example.net> - 2013-03-27 09:06 +0100
              Re: cleaning up first php page was Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-04-04 01:48 -0700
                Re: cleaning up first php page was Re: can't get  includes to load Cal Dershowitz <cal@example.invalid> - 2013-04-04 01:52 -0700
                Re: cleaning up first php page was Re: can't get  includes to load Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-04 08:57 -0400
          Re: can't get  includes to load Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-27 09:08 +0100

Page 2 of 2 — ← Prev page 1 [2]


#8939 — Re: cleaning up first php page was Re: can't get includes to load

FromJerry Stuckle <jstucklex@attglobal.net>
Date2013-04-04 08:57 -0400
SubjectRe: cleaning up first php page was Re: can't get includes to load
Message-ID<kjjt7k$umf$1@dont-email.me>
In reply to#8936
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@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#8874

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-03-27 09:08 +0100
Message-ID<1972622.Wd2QAAWABF@PointedEars.de>
In reply to#8869
Jim Higgins wrote:

> Cal Dershowitz wrote:
>> I have simple questions at this point: how do you try something new on
>> your server without stomping all over the last thing that worked?
> 
> Let's say the page you want to work on is named ORIGINAL.PHP.  You
> make a copy of that file and you call it something like
> ORIGINAL.PHP.BAK.  Then you work on ORIGINAL.PHP.  If you need more
> copies og that original, you can append a date or a letter or whatever
> after BAK to differentiate them.

Or you are a *responsible* *professional* Web developer.

Then you would use a local (private) Web server with a sufficiently similar 
setup on which you test changes before you upload to the remote (public) 
one.  You would not upload files directly, but commit to a project 
repository of a version control system (like SVN or git) allowing you to 
roll back the remote version to a working state at any time should it turn 
out that – then unlikely – something did not work remotely that did work 
locally.

You would keep your commits atomic (changes that belong together go into the 
same commit) and write commit comments so you would know what you changed 
and where you changed it (and, if you are in a team, who made the change), 
removing the need for a host of almost-duplicate files on the server that 
only you know about (and have to reverse-engineer with manual diff what you 
changed and why you changed it back then; and, if you are in a team, who 
changed it).


HTH

PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.php


csiph-web