Re: [PHP] Re: PHP includes

2009-03-10 Thread Michael A. Peters
Mayer, Jonathan wrote: Just thought I'd point out that it's recommended against giving non-php extensions to PHP code pages. Basically, making all of your include files .inc without the server correctly configured to recognise all .inc files as PHP files, you are opening yourself up to possib

RE: [PHP] Re: PHP includes

2009-03-10 Thread Mayer, Jonathan
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: 09 March 2009 19:55 To: Mayer, Jonathan Cc: Gary; php-general@lists.php.net Subject: RE: [PHP] Re: PHP includes On Mon, 2009-03-09 at 15:10 +, Mayer, Jonathan wrote: > >Thank you to everybod

[PHP] Re: PHP includes

2009-03-10 Thread Gary
Again, thank you for everyone that offered their advice. ""Gary"" wrote in message news:8a.64.51087.33bf3...@pb1.pair.com... > I'm working on learning php and have been toying with includes, and I am > trying to figure the advantages/disadvantages to using them. > > I know that using them elim

[PHP] Re: PHP includes

2009-03-10 Thread Gary
Again, thank you for everyone that offered their advice. ""Gary"" wrote in message news:8a.64.51087.33bf3...@pb1.pair.com... > I'm working on learning php and have been toying with includes, and I am > trying to figure the advantages/disadvantages to using them. > > I know that using them elim

Re: [PHP] Re: PHP includes

2009-03-09 Thread Ashley Sheridan
On Mon, 2009-03-09 at 15:23 -0500, Larry Garfield wrote: > On Monday 09 March 2009 3:07:17 pm Nathan Rixham wrote: > > Ashley Sheridan wrote: > > > Just thought I'd point out that it's recommended against giving non-php > > > extensions to PHP code pages. Basically, making all of your include > > >

Re: [PHP] Re: PHP includes

2009-03-09 Thread Larry Garfield
On Monday 09 March 2009 3:07:17 pm Nathan Rixham wrote: > Ashley Sheridan wrote: > > Just thought I'd point out that it's recommended against giving non-php > > extensions to PHP code pages. Basically, making all of your include > > files .inc without the server correctly configured to recognise al

Re: [PHP] Re: PHP includes

2009-03-09 Thread Nathan Rixham
Ashley Sheridan wrote: Just thought I'd point out that it's recommended against giving non-php extensions to PHP code pages. Basically, making all of your include files .inc without the server correctly configured to recognise all .inc files as PHP files, you are opening yourself up to possible h

RE: [PHP] Re: PHP includes

2009-03-09 Thread Ashley Sheridan
On Mon, 2009-03-09 at 15:10 +, Mayer, Jonathan wrote: > >Thank you to everybody that replied...but it almost seems it is making > extra > >work. > > >I can understand using an include for a menu, since they tend to change > > >often and it is on every page, but the normal content I am not >

[PHP] Re: PHP includes

2009-03-09 Thread Nathan Rixham
Gary wrote: Thank you to everybody that replied...but it almost seems it is making extra work. What is the best type of file to be used as an include (.txt, .php). new I forgot something! the best type of file to be used as an include differs on a case by case basis. name the files correc

[PHP] Re: PHP includes

2009-03-09 Thread Nathan Rixham
Gary wrote: Thank you to everybody that replied...but it almost seems it is making extra work. I can understand using an include for a menu, since they tend to change often and it is on every page, but the normal content I am not understanding the benefit. If I have a page that has unique co

Re: [PHP] Re: PHP includes

2009-03-09 Thread Sudheer Satyanarayana
Gary wrote: Thank you to everybody that replied...but it almost seems it is making extra work. I can understand using an include for a menu, since they tend to change often and it is on every page, but the normal content I am not understanding the benefit. If I have a page that has unique co

RE: [PHP] Re: PHP includes

2009-03-09 Thread Bob McConnell
From: Gary > > Thank you to everybody that replied...but it almost seems it is making extra > work. > > I can understand using an include for a menu, since they tend to change > often and it is on every page, but the normal content I am not understanding > the benefit. If I have a page that h

RE: [PHP] Re: PHP includes

2009-03-09 Thread Mayer, Jonathan
>Thank you to everybody that replied...but it almost seems it is making extra >work. >I can understand using an include for a menu, since they tend to change >often and it is on every page, but the normal content I am not understanding >the benefit. If I have a page that has unique content on

[PHP] Re: PHP includes

2009-03-09 Thread Gary
Thank you to everybody that replied...but it almost seems it is making extra work. I can understand using an include for a menu, since they tend to change often and it is on every page, but the normal content I am not understanding the benefit. If I have a page that has unique content on it, t

RE: [PHP] Re: PHP Includes and Echoes (From the top...)

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 13:54, Freedomware wrote: > Thanks for all the tips. It's getting generally getting > clearer, but I'm > a little confused somewhere. [SNIP] > I inserted one of the functions you suggested - $includea1 = TRUE; - > after the include, but I'm sure I did it wrong. Just like bef

Re: [PHP] Re: PHP Includes and Echoes (From the top...)

2004-01-16 Thread Freedomware
Thanks for all the tips. It's getting generally getting clearer, but I'm a little confused somewhere. Can I give you a better explanation of what I'm trying to do, along with my latest code? The pages on this site focus on various nations and states, with lots of links like this: [LOCAL] ../w

RE: [PHP] Re: PHP Includes and Echoes (Sorry; read this post firs t!)

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 00:30, Freedomware wrote: > I should have played with this some more before I posted more > questions. After fixing an error on the included page, I replaced > every instance of na/a1 on both pages with a1. That seemed to fix > everything; the first style sheet comes through, bu

RE: [PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-16 Thread Ford, Mike [LSS]
On 15 January 2004 22:39, Luke wrote: > ? Holy cow, this gets simpler all the time. Pretty soon, there'll be > ? nothing left on my page but PHP includes and echo functions! ? > ? Does this cut down on a website's file size? In other > words, are the php > ? includes effectively inactive when no o

[PHP] Re: PHP Includes and Echoes (Sorry; read this post first!)

2004-01-15 Thread Freedomware
Sheez, I spotted my error regarding "$statename." I changed it to the following, and it fixed that problem. $todayDate = date("m-d-Y"); echo 'Freedomware > ' . $statename . ''; echo ''; echo ''; echo ''; if($includea1 == TRUE){ echo ''; } echo ''; ?> -- PHP General Mailing List (http://www.

[PHP] Re: PHP Includes and Echoes (Sorry; read this post first!)

2004-01-15 Thread Freedomware
I should have played with this some more before I posted more questions. After fixing an error on the included page, I replaced every instance of na/a1 on both pages with a1. That seemed to fix everything; the first style sheet comes through, but the second one is blocked - and I don't see any

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
Oops, I spotted some big errors in my included page already. Here's the new page: $todayDate = date("m-d-Y"); echo 'Freedomware > "$statename"'; echo ''; echo ''; echo ''; if($includena/a1 == TRUE){ echo ''; } echo ''; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
I wrote: ? But suppose there's a certain page where I don't want the style sheet in ? the middle - the one I named MIDDLE. Is there a way to mark it in the ? include page, then instruct the main page to either not import it or ? replace it with nothing ("")? Luke wrote: youd have to use a varia

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Luke
? Holy cow, this gets simpler all the time. Pretty soon, there'll be ? nothing left on my page but PHP includes and echo functions! ? ? Does this cut down on a website's file size? In other words, are the php ? includes effectively inactive when no one's viewing your main pages, ? leaving them emp

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Freedomware
i just changed the opening and closing tags a little (you didnt need so many) but the main change is, now the variables come before the included file, so that the include file can access those variables too. Holy cow, this gets simpler all the time. Pretty soon, there'll be nothing left on my page

[PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread Luke
hi Very simple problems, good to see ur getting the hang of it :) the first is, you have defined your variables after you include the page, so that the echo is outputting a blank variable... so instead of: make it '; include ("../../../../includes/javascript.php"); include ("../../../../i