You are here: Re: Lost formatting in browser 'view source' « All PHP « IT news, forums, messages
Re: Lost formatting in browser 'view source'

Posted by dorayme on 11/21/06 21:20

In article <4sfgsrFv38k9U1@mid.individual.net>,
"J.O. Aho" <user@example.net> wrote:

> dorayme wrote:
> > In article <4sejtcFvg06eU1@mid.individual.net>,
> > "J.O. Aho" <user@example.net> wrote:
> >
> >>> Some sites I maintain have a lot of pages and changing the names
> >>> of all the files is the last thing I would do, not the first ;-)
> >> A small shell script fixes both file names and anchor urls, it's not that
> >> you
> >> must to rename files and fix links manually.
> >>
> >> http://www.faqs.org/docs/Linux-HOWTO/Bash-Prog-Intro-HOWTO.html#ss12.3
> >>
> >> and checking the man page for sed.
> >>
> > What does "fix" mean? Sorry, I am lost. I don't want to change
> > all the file names for a big site, each of which has a footer
> > involved. Not because I can't do it easily en masse (without
> > going to each file name and renaming) but because it does not
> > sound like a good idea to me to change all my files and all the
> > urls and all the links in everyone's bookmarks and then
> > instigating further things to cope with this.
>
> At some point you made a wrong decision, as included php into your *.html
> files, sure you can use AddType on an apache server, what about you switch to
> a host who has IIS. At the same time your html pages without php-code are
> processed by php.
>
> Renaming the files to *.php is a better idea than use AddType. If you are
> concerned about users links and bookmarks to break, you have the nice option
> in apache to rewrite rules, if they try to load a "missing" html page,
> redirect them to a php file with the same name.
>
> http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
> http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
>

I am slowly warming to the idea of changing the files to .php. My
fears about bookmarks and stuff are probably overwrought! And I
understand that there are things you can do to link files being
asked for (though it is a complete fog to me how all this is
done) In my fumbling experiments, it sure makes life simpler to
name my .html files .php instead! Everything works easily then as
far as the includes are concerned. Just as you said, I think, in
the first place!

So far, since it seems so hard to get onto all this business of
sed and man for me for now, I might just have the home page of
some sites, maybe also some important website section head pages
as .html. Footers and other things can be hard wired into those
as usual. The rest can just be .php with geeky, reputaion
enhancing includes in. No fancy doodle sed or linking or server
fiddling needed.

It is often said to change the server if they don't do this or
that. But this is not so easy if it is not your own website or
domain but a customer's.


> > Sorry J.O., I may be misunderstanding all this. Sounds terribly
> > complicated. Checking "man pages for sed". For sed!
> >
> > Honestly, it was easier using find and replace in my text editor,
> > (3 secs work to change a site) and on broadband not that much
> > longer to reload all the html files. No other downsides I could
> > see (there is one, I learnt recently, to help the user: about re
> > caching repeated text...) but I am wondering if all the claims
> > for all the trumpeting of the great value of includes is greatly
> > exaggerated now!
>
> You painted up that you had so many files to change, that the usage of sed
> would be a lot faster than load one page at the time

Please see my reply to 'a human person" regarding this point.
There is one site I made and maintain that is fairly big and I am
attracted to the idea of includes (and other php) for.


> used a editors
> find/replace function. sed is a program you find on most unix like systems
> and
> the program man shows you manual pages for programs: man sed
>
>
> > But I will persist because it seems so stupid not to have
> > includes! I guess a solution to this formatting thing will emerge
> > at some stage!
>
> Includes are used so that you have ONE file to edit instead of MAY pages with
> the same thing repeated over and over again.

I do understand this (but again, see my remarks to "a human
person".

Thanks aHo for your persistence, it takes a while for me to adapt
to anything new at all!

--
dorayme

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация