Re: [PHP] includes linking to other files, help with relatives

2009-12-06 Thread Midhun Girish
Hello Allen McCabe, it doesnt matter from which folder you call the database.php file. only thing u must take care is to use correct path in the database.php file so that key.txt is accurately referenced. if you are still having problems, use absolute paths instead of relative path...hers

[PHP] includes linking to other files, help with relatives

2009-12-06 Thread Allen McCabe
I am creating a database connection path that check for a session variable to get the username, password, dbname, etc., but if the session has not been set yet, I need my script to get those values from another file (KEY.txt) where they are saved. I want to access this class from two directories, a

Re: [PHP] More PHP Includes

2009-03-11 Thread tedd
At 9:59 AM -0400 3/10/09, Gary wrote: Thanks again for all the help. I created a simple page of all includes (header, menu, 3 columns). I mixed the file types up. The menu (projectseven PMM) I saved as a library item, works fine. Had an HTML file in there, but I am guessing that having 2 page

Re: [PHP] More PHP Includes

2009-03-11 Thread 9el
On Wed, Mar 11, 2009 at 6:16 AM, Gary wrote: > Jochem > > Thanks for your reply, the project seven and DW was just for a point of > information, same as if you have an issue with a computer you generally > find > it a good idea to list your operating system and other pertinent facts. What Joche

RE: [PHP] More PHP Includes

2009-03-11 Thread Mayer, Jonathan
-Original Message- From: Gary [mailto:gwp...@ptd.net] Sent: 11 March 2009 00:17 To: php-general@lists.php.net Subject: Re: [PHP] More PHP Includes >Jochem > >Thanks for your reply, the project seven and DW was just for a point of >information, same as if you have an

Re: [PHP] More PHP Includes

2009-03-10 Thread Gary
Jochem Thanks for your reply, the project seven and DW was just for a point of information, same as if you have an issue with a computer you generally find it a good idea to list your operating system and other pertinent facts. I had coded the scripts and files by hand. The file was not on the

Re: [PHP] More PHP Includes

2009-03-10 Thread Jochem Maas
Gary schreef: > I'm sorry you were not able to understand the questions, but thank you for > trying. a few tips: 1. don't assume people know what 'projectseven PMM' 2. it's doubtful anyone worth their salt on this list uses or knows much about a mind-bending, soul-destroyer like DreamWeaver. 3.

[PHP] Re: More PHP Includes

2009-03-10 Thread Clancy
On Tue, 10 Mar 2009 09:59:53 -0400, gwp...@ptd.net ("Gary") wrote: >Thanks again for all the help. > >I created a simple page of all includes (header, menu, 3 columns). I mixed >the file types up. The menu (projectseven PMM) I saved as a library item, >works fine. Had an HTML file in there, bu

Re: [PHP] More PHP Includes

2009-03-10 Thread Gary
I'm sorry you were not able to understand the questions, but thank you for trying. The path to the include is not an absolute path. "Jochem Maas" wrote in message news:49b6b6d8.7050...@iamjochem.com... > Gary schreef: >> Thanks again for all the help. >> >> I created a simple page of all incl

Re: [PHP] More PHP Includes

2009-03-10 Thread 9el
On Tue, Mar 10, 2009 at 7:59 PM, Gary wrote: > Thanks again for all the help. > > I created a simple page of all includes (header, menu, 3 columns). I mixed > the file types up. The menu (projectseven PMM) I saved as a library item, > works fine. Had an HTML file in there, but I am guessing tha

Re: [PHP] More PHP Includes

2009-03-10 Thread Jochem Maas
Gary schreef: > Thanks again for all the help. > > I created a simple page of all includes (header, menu, 3 columns). I mixed > the file types up. The menu (projectseven PMM) I saved as a library item, > works fine. Had an HTML file in there, but I am guessing that having 2 page > declaration

[PHP] More PHP Includes

2009-03-10 Thread Gary
Thanks again for all the help. I created a simple page of all includes (header, menu, 3 columns). I mixed the file types up. The menu (projectseven PMM) I saved as a library item, works fine. Had an HTML file in there, but I am guessing that having 2 page declarations along with an extra set

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] PHP includes

2009-03-09 Thread Nathan Rixham
Virgilio Quilario wrote: 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 eliminates the need to "put" the files once altered as with a template, however, is that the only advantage. My p

Re: [PHP] PHP includes

2009-03-09 Thread Virgilio Quilario
> 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 eliminates the need to "put" the files once altered > as with a template, however, is that the only advantage. > > My particular conce

Re: [PHP] PHP includes

2009-03-09 Thread tedd
At 1:06 PM -0400 3/8/09, Gary wrote: 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 eliminates the need to "put" the files once altered as with a template, however, is that the only adva

Re: [PHP] PHP includes

2009-03-08 Thread George Larson
Right. There are several advantages to using included files. You can write routines that you're going to use repeatedly and just include the file with the code, instead of re-inventing the wheel, as they say. Consistency is another advantage. So, if you design your header, sidebar and footer a

Re: [PHP] PHP includes

2009-03-08 Thread Sudheer Satyanarayana
Gary wrote: 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 eliminates the need to "put" the files once altered as with a template, however, is that the only advantage. My particular

[PHP] PHP includes

2009-03-08 Thread Gary
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 eliminates the need to "put" the files once altered as with a template, however, is that the only advantage. My particular concerns are wi

Re: [PHP] Includes only if required?

2009-02-02 Thread Eric Butera
On Mon, Feb 2, 2009 at 6:42 AM, Edmund Hertle wrote: > Hey, > normally I prefer to do all my includes (classes + config files) at the > beginning if my php files. But recently I thought about including some > classes only if they are needed later in my code (like pear Mail and > Mail_mime only if

Re: [PHP] Includes only if required?

2009-02-02 Thread Richard Heyes
Hi, > Mail_mime Ooh... > only if an e-mail is about to be sent) because of speed issues. So > my question: Is this something I should consider? Or is it something I > normally will not notice? Depends on the load on your server. If you're getting a billion requests per second, then it may well

[PHP] Includes only if required?

2009-02-02 Thread Edmund Hertle
Hey, normally I prefer to do all my includes (classes + config files) at the beginning if my php files. But recently I thought about including some classes only if they are needed later in my code (like pear Mail and Mail_mime only if an e-mail is about to be sent) because of speed issues. So my qu

Re: [PHP] Question About PHP Includes

2008-04-03 Thread Jon Wynacht
Whoopssorry abut the reply ;-( Thanks for the advice...I'll start making the changes in the path. Cheers, Jon On Apr 3, 2008, at 8:56 AM, Daniel Brown wrote: On Thu, Apr 3, 2008 at 11:42 AM, Jon Wynacht <[EMAIL PROTECTED]> wrote: Hi Dan, I just tried that and didn't see any errors on

Re: [PHP] Question About PHP Includes

2008-04-03 Thread Daniel Brown
On Thu, Apr 3, 2008 at 11:42 AM, Jon Wynacht <[EMAIL PROTECTED]> wrote: > Hi Dan, > > I just tried that and didn't see any errors on the screen or in my log > file. I'm really quite stumped and am wondering if my ISP made some changes > on their end? > > Thanks, > > Jon Please keep all repl

Re: [PHP] Question About PHP Includes

2008-04-03 Thread Daniel Brown
On Thu, Apr 3, 2008 at 11:22 AM, jwynacht <[EMAIL PROTECTED]> wrote: > > Hi, > > I help maintain a Movable Type install for a non-profit organization. Things > have worked well with the site but the other day the home page went blank > and the rest of the pages lost all of their formatting. I'v

[PHP] Question About PHP Includes

2008-04-03 Thread jwynacht
e the absolute paths in the ini_set statements to be relative paths I get my header information. I'm stumped...any ideas? I'm running PHP 5.2.5. Thanks! Jon -- View this message in context: http://www.nabble.com/Question-About-PHP-Includes-tp16467560p16467560.html Sent from the PHP - G

Re: [PHP] Includes eating up my time [SOLVED]

2007-08-02 Thread Dave M G
David, Thank you for responding. __autoload ... which basically only loads classes when they are required. Yes, this is exactly what I needed. Not only was I already on PHP5, but fortunately I had also already been building my classes so that it was one class per file, as __autoload requir

Re: [PHP] Includes eating up my time

2007-07-31 Thread Larry Garfield
On Tuesday 31 July 2007, Dave M G wrote: > PHP general list, > > This is probably obvious to people who are good at PHP, but I'm > > I have a PHP based CMS (content management system) built, which has > grown and become quite robust. It's now spread out over about 30 files, > and each file represen

Re: [PHP] Includes eating up my time

2007-07-31 Thread Chad Robinson
Dave M G wrote: Currently, my processes are taking under a second, but they can be around half a second or more. Although it all happens too fast for me to really notice as a person, it seems to me that a half second of processing time might be kind of long and lead to scalability problems. Th

Re: [PHP] Includes eating up my time

2007-07-31 Thread David Restall - System Administrator
Hi Dave, > PHP general list, > > This is probably obvious to people who are good at PHP, but I'm > > I have a PHP based CMS (content management system) built, which has > grown and become quite robust. It's now spread out over about 30 files, > and each file represents one class within the obj

[PHP] Includes eating up my time

2007-07-31 Thread Dave M G
PHP general list, This is probably obvious to people who are good at PHP, but I'm I have a PHP based CMS (content management system) built, which has grown and become quite robust. It's now spread out over about 30 files, and each file represents one class within the object oriented design. E

Re: [PHP] Includes, Require, Location, Other

2006-06-18 Thread Larry Garfield
A couple of things. 1) Delay your output to the very end. That way you can still do page redirects and build whole new pages depending on the errors you get. 2) Store errors in the session, then when building the page have a place for "put any error messages here, then delete them from the ses

[PHP] Includes, Require, Location, Other

2006-06-18 Thread Beauford
Hi, If I were to have something like the following, what is the best way (or best practice) to reload the page and display the error - or is there a better way to do this. I want to keep the site uniform and don't want errors popping up and making a mess. Thanks B -

Re: [PHP] Includes and paths confusion

2006-04-29 Thread Richard Lynch
On Fri, April 28, 2006 3:09 am, Nick Wilson wrote: > [EMAIL PROTECTED] > ls > ads/ config.inc db.inc funcs.inc init.inc > > where ads/ is a whole huge set of scripts from an existing setup. ads/ > was originally placed on its own domain as it's a version of phpadsnew > and runs as a server all

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Jochem Maas
dirs named in include_path should not have a slash at the end. and don't forget to include the DOT as one of your include pathes e.g. ini_set('include_path', '.:/the/rest'); can you send the list of requires you do [again] (and state where the files are actually living on disk) - I'm on 3 hour

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
* and then Jochem Maas declared > check directory permission, check the include_path is being set, > check the include path is actually correct (I take it you have a good > understanding how include_path works). Good call on dir perms, but yes, they appear to be fine. I *think* i have a good

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Jochem Maas
Nick Wilson wrote: * and then Jochem Maas declared Nick Wilson wrote: ... use something *like* the following: $oldincpath = ini_get('include_path'); ini_set('include_path', 'path/to/ads/stuff:etc'); // do your 'ads' requires ini_set('include_path', $oldincpath); Unfortunately th

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
* and then Jochem Maas declared > Nick Wilson wrote: > >Hello all, Im having some problems understanding why some requires() are > >failing. > >Let me see if i can describe what's going on clearly... > >I have this: > >[EMAIL PROTECTED] > ls > >ads/ config.inc db.inc funcs.inc init.inc >

Re: [PHP] Includes and paths confusion

2006-04-28 Thread Jochem Maas
Nick Wilson wrote: Hello all, Im having some problems understanding why some requires() are failing. Let me see if i can describe what's going on clearly... I have this: [EMAIL PROTECTED] > ls ads/ config.inc db.inc funcs.inc init.inc where ads/ is a whole huge set of scripts from an exi

[PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
Hello all, Im having some problems understanding why some requires() are failing. Let me see if i can describe what's going on clearly... I have this: [EMAIL PROTECTED] > ls ads/ config.inc db.inc funcs.inc init.inc where ads/ is a whole huge set of scripts from an existing setup. ads/ was

Re: [PHP] Setting or Getting Relative Path for PHP Includes

2004-12-21 Thread Curt Zirzow
* Thus wrote Anthony Baker: > Hey Folks, > > Hoping someone can aid me with a newbie-ish question. > > I often use PHP includes in my files to pull in assets, but I hard code > the relative path to the root html directory for the sites that I'm > working on i

Re: [PHP] Setting or Getting Relative Path for PHP Includes

2004-12-21 Thread Richard Lynch
Anthony Baker wrote: > I often use PHP includes in my files to pull in assets, but I hard code > the relative path to the root html directory for the sites that I'm > working on in each file. Example below: While I happen to think using include_path and $_SERVER is a better solut

Re: [PHP] Setting or Getting Relative Path for PHP Includes

2004-12-20 Thread Jordi Canals
<[EMAIL PROTECTED]> wrote: > Hey Folks, > > Hoping someone can aid me with a newbie-ish question. > > I often use PHP includes in my files to pull in assets, but I hard code > the relative path to the root html directory for the sites that I'm > working on in each fi

[PHP] Re: Setting or Getting Relative Path for PHP Includes

2004-12-20 Thread Jason Barnett
As already suggested there are $_SERVER variables that can assist you here. Although if you plan on having an include file that will be included by every script in your site you could also use the __FILE__ constant. In your case the following would work: // main.inc.php, located in /home/virt

RE: [PHP] Setting or Getting Relative Path for PHP Includes

2004-12-20 Thread phpninja
example to use it for an image To do includes for a stylesheet or somethin: : -phpninja -Original Message- From: Anthony Baker [mailto:[EMAIL PROTECTED] Sent: Monday, December 20, 2004 12:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Setting or Getting Relative Path for PHP Includes Hey

Re: [PHP] Setting or Getting Relative Path for PHP Includes

2004-12-20 Thread Jason Wong
On Tuesday 21 December 2004 04:41, Anthony Baker wrote: > Either that, or is there a way to call this variable from the server > itself so that it's automatically -- and correctly -- set? Use a combination of one or more items from $_SERVER. -- Jason Wong -> Gremlins Associates -> www.gremlins.

[PHP] Setting or Getting Relative Path for PHP Includes

2004-12-20 Thread Anthony Baker
Hey Folks, Hoping someone can aid me with a newbie-ish question. I often use PHP includes in my files to pull in assets, but I hard code the relative path to the root html directory for the sites that I'm working on in each file. Example below: I'd like to be able to set the relative

[PHP] includes and classes

2004-04-21 Thread dubreuilmedia
Hi I was wondering about includes and classes. I have a class in which depending on a member variable, i should load the proper include, which is really the proper config file for that moment. Now if i do this in the constructor i can't seem to be able to use the variables found in my config in th

Re: [PHP] includes

2004-04-05 Thread Richard Harb
Monday, April 5, 2004, 4:47:52 PM, you wrote: > Hello all, > I have a problem. My directory list is similar to this: >>root > >tmpl > >inc > >forums > My question is in the test_form and message forums. How do I do the include > files to read from the tmpl and inc?? > I can get t

Re: [PHP] includes

2004-04-05 Thread Daniel Clark
I had some similar problems ! Here's what I did. include $_SERVER['DOCUMENT_ROOT'] . '/includes/_myInclude.php' ; Putting the DOCUMENT_ROOT ensured I was always pointing to the top directory of the web pages. Daniel Clark >>I have a problem. My directory list is similar to this: >> >root >>

Re: [PHP] includes

2004-04-05 Thread Chris Hayes
At 16:47 5-4-04, you wrote: Hello all, I have a problem. My directory list is similar to this: >root >tmpl >inc >forums >test_forum >messages >test_forum1 .messages My question is in the test_form and message forums. How do I do the include file

RE: [PHP] includes

2004-04-05 Thread Hawkes, Richard
ou're after?! Richard -Original Message- From: Will [mailto:[EMAIL PROTECTED] Sent: 05 April 2004 15:48 To: [EMAIL PROTECTED] Subject: [PHP] includes Hello all, I have a problem. My directory list is similar to this: >root >tmpl >inc >forums

RE: [PHP] includes

2004-04-05 Thread Angelo Zanetti
I think you can do this: "../tmpl/header.htm" try it and let us know!! hope this helps Angelo -Original Message- From: Will [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 4:48 PM To: [EMAIL PROTECTED] Subject: [PHP] includes Hello all, I have a problem. My directo

[PHP] includes

2004-04-05 Thread Will
Hello all, I have a problem. My directory list is similar to this: >root >tmpl >inc >forums >test_forum >messages >test_forum1 .messages My question is in the test_form and message forums. How do I do the include files to read from the tmpl and

RE: [PHP] Can you recommend a good PHP includes tutorial?

2004-01-16 Thread Chris W. Parker
Freedomware on Wednesday, January 14, 2004 5:17 AM said: > Wow, that is a lot simpler than I imagined. Thanks for the tip! Imagined? What did the book tell you to do? Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

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 eff

[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,

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

2004-01-15 Thread Freedomware
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 empty of the included pages? Here's another question. I'm replacing the

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

2004-01-15 Thread Luke
e inside a wrote in message news:[EMAIL PROTECTED] > I'm having a blast with PHP includes and echo functions; I never dreamed > they could be so simple and effective. But I have a couple questions > relating to head sections and search engines. > > Consider the following ht

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

2004-01-15 Thread Arthur Pelkey
You are defining the vars after the header/title has already been processed, put it before the head.php, and it should work -Original Message- From: Freedomware [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 3:54 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Includes and Echoes

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

2004-01-15 Thread CPT John W. Holmes
From: "Freedomware" <[EMAIL PROTECTED]> > I discovered that includes will apparently work just about anywhere, but > echo functions apparently don't work with the tag and meta tags; > at least, I can't see the word "Alaska" in those locations when I click > View Source in my browser. Look back o

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

2004-01-15 Thread Freedomware
I'm having a blast with PHP includes and echo functions; I never dreamed they could be so simple and effective. But I have a couple questions relating to head sections and search engines. Consider the following html code: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

Re: [PHP] PHP Includes versus sloppy Dreamweaver code and split elements

2004-01-15 Thread Freedomware
Marek Kilimajer wrote: Sure you can, but I would not open a tag in one file, and close the tag in another. This makes code very unreadable, the errors are hard to find and also the code is not reusable. Hm That's a good point. Maybe I'll take another look at layers, as the table design

Re: [PHP] PHP Includes versus sloppy Dreamweaver code and split elements

2004-01-15 Thread Marek Kilimajer
Freedomware wrote: My first question is really trivial, but I noticed that Dreamweaver likes to display my PHP includes code like this... When I do a search and replace function, it often jumps onto another element's line, like this: I changed the code to

Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Rory McKinley
and Apache," which had me thinking > making PHP includes was going to be a minor wrestling match. In fact, > they were so simple even I can understand them, and the information you > just gave me is more or less the vision I had in my mind some time ago, > before I even heard of P

[PHP] PHP Includes versus sloppy Dreamweaver code and split elements

2004-01-15 Thread Freedomware
My first question is really trivial, but I noticed that Dreamweaver likes to display my PHP includes code like this... When I do a search and replace function, it often jumps onto another element's line, like this: I changed the code to this: and it see

Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Freedomware
Rory McKinley wrote: I hope this has clarified matters somewhat and not made things worse. Absolutely; the only thing that has made matters worse so far is the book "Teach Yourself PHP, MySQL and Apache," which had me thinking making PHP includes was going to be a minor wrestling matc

Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Rory McKinley
On 14 Jan 2004 at 23:16, David Blomstrom wrote: > --- Rory McKinley <[EMAIL PROTECTED]> wrote: > > > A possible option could be something like this > > > > {calling_template.php} > > > > > /*State name does not have to be set statically, > > can be set from SQL query > > etc*/ > > I t

Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Freedomware
(Oops - I replied by e-mail; guess I should have posted my response to the list.) --- Rory McKinley <[EMAIL PROTECTED]> wrote: > A possible option could be something like this > > {calling_template.php} > > /*State name does not have to be set statically, > can be set from SQL query > etc*

Re: [PHP] Variable PHP Includes - Is there such a thing?

2004-01-15 Thread Rory McKinley
On 14 Jan 2004 at 21:16, Freedomware wrote: > Suppose you design a standard banner for the top of your web pages and > use an include to insert it into every page on your site, like this: > > include ("../../../../includes/header.php"); > ?> > > But you later decide you'd like to change just o

[PHP] Variable PHP Includes - Is there such a thing?

2004-01-14 Thread Freedomware
Suppose you design a standard banner for the top of your web pages and use an include to insert it into every page on your site, like this: But you later decide you'd like to change just one element on each page. For example, you might design a standard image banner, followed by a title and su

Re: [PHP] Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Steve Edberg
And, you can even do this automatically using the auto_prepend_file and auto_append_file settings: http://us3.php.net/manual/en/configuration.directives.php These can be set in your Apache config file, php.ini or .htaccess, so you can control what files are used down to the lowest subdirectory

Re: [PHP] Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Freedomware
Wow, that is a lot simpler than I imagined. Thanks for the tip! Jay Blanchard wrote: [snip] I thought this would be the easiest thing to learn, but I'm striking out right and left. I bought a book about PHP, but the includes examples don't work for me at all. I searched several forums and www.ph

[PHP] Re: Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Freedomware
Yikes, scratch my last post! I think I stumbled over the answer just after I posted it. Freedomware wrote: I thought this would be the easiest thing to learn, but I'm striking out right and left. I bought a book about PHP, but the includes examples don't work for me at all. I searched several

RE: [PHP] Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Jay Blanchard
[snip] I thought this would be the easiest thing to learn, but I'm striking out right and left. I bought a book about PHP, but the includes examples don't work for me at all. I searched several forums and www.php.net, but it's hard to even zero in on a good tutorial. [/snip] http://www.php.net/

[PHP] Can you recommend a good PHP includes tutorial?

2004-01-14 Thread Freedomware
I thought this would be the easiest thing to learn, but I'm striking out right and left. I bought a book about PHP, but the includes examples don't work for me at all. I searched several forums and www.php.net, but it's hard to even zero in on a good tutorial. I think part of the problem is tha

[PHP] Can't Access PHP Includes Above Current Directory if using SSL

2003-12-29 Thread Steve Benson
I hope all have had a great holiday season! My configuration is: RH Linux Kernel 2.4.20-8, Apache 2.0.48, OpenSSL -0.9.6l, PHP 4.3.4, Apache was compiled with SSL and SSL appears to work OK. My document root is http - /www/sd/htdocs, https - /www/sd/htdocs/jobs I don't want anyone accessing the j

Re: [PHP] Includes inside includes

2003-12-21 Thread Website Managers.net
To call the file from anywhere within the document space, try this: include($_SERVER["DOCUMENT_ROOT"]."/common/setup.inc"); Jim - Original Message - From: "Robbert van Andel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, Decembe

[PHP] Includes inside includes

2003-12-21 Thread Robbert van Andel
I've written a class that is calling an include function to include a setup file. The problem is that the setup file is in another directory than the class. I'm including the file using: include ("../common/setup.inc"); Is there a way that i can make the relative path inside the class definitio

Re: [PHP] includes...

2003-12-18 Thread BAO RuiXian
the one in your path. Best Bao Marco Tabini <[EMAIL PROTECTED]> 18/12/2003 14:01 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP] includes... That means "the current directory" Cheers, Marco -- php|architect - The Magazine for PHP Professionals Try us free

  1   2   >