Re: [PHP] Include Files in HTML

2009-09-06 Thread Ashley Sheridan
On Fri, 2009-09-04 at 18:21 -0500, phphelp -- kbk wrote: On Sep 4, 2009, at 5:03 PM, sono...@fannullone.us wrote: Depends on what you are including. The only tags that can be inside the head are base, link, meta, script, style, and title. Everything else is either body or prologue.

RE: [PHP] Include Files in HTML

2009-09-04 Thread Bob McConnell
From: sono-io at fannullone.us In my readings, I've run across examples showing include files being called from within the head/head tags, and other examples showing them called within body/body. I've always put them in the header section myself, but I was wondering if one is

RE: [PHP] Include Files in HTML

2009-09-04 Thread Joost
Bob McConnell wrote: From: sono-io at fannullone.us In my readings, I've run across examples showing include files being called from within the head/head tags, and other examples showing them called within body/body. I've always put them in the header section myself, but I was

Re: [PHP] Include Files in HTML

2009-09-04 Thread sono-io
On Sep 4, 2009, at 1:05 PM, Bob McConnell wrote: Depends on what you are including. The only tags that can be inside the head are base, link, meta, script, style, and title. Everything else is either body or prologue. I meant PHP includes like this one: ?php

Re: [PHP] Include Files in HTML

2009-09-04 Thread Tommy Pham
- Original Message From: sono...@fannullone.us sono...@fannullone.us To: PHP General List php-general@lists.php.net Sent: Friday, September 4, 2009 12:57:08 PM Subject: [PHP] Include Files in HTML In my readings, I've run across examples showing include files being called

Re: [PHP] Include Files in HTML

2009-09-04 Thread Tommy Pham
- Original Message From: Tommy Pham tommy...@yahoo.com To: php-general@lists.php.net Sent: Friday, September 4, 2009 4:11:31 PM Subject: Re: [PHP] Include Files in HTML - Original Message From: sono...@fannullone.us To: PHP General List Sent: Friday, September 4

Re: [PHP] Include Files in HTML

2009-09-04 Thread phphelp -- kbk
On Sep 4, 2009, at 5:03 PM, sono...@fannullone.us wrote: Depends on what you are including. The only tags that can be inside the head are base, link, meta, script, style, and title. Everything else is either body or prologue. I meant PHP includes like this one: ?php

Re: [PHP] Include files....

2007-05-21 Thread Richard Lynch
An include jumps back into HTML mode so you need: ?php $server = ; $username = ; . . . ? On Fri, May 18, 2007 3:05 pm, Jason Pruim wrote: Okay, Very Newbie-ish question coming! I can't figure out why my include won't work... Here's the text: index.php: ?PHP include 'defaults.php';

Re: [PHP] Include files....

2007-05-18 Thread Tijnema !
On 5/18/07, Jason Pruim [EMAIL PROTECTED] wrote: Okay, Very Newbie-ish question coming! I can't figure out why my include won't work... Here's the text: index.php: ?PHP include 'defaults.php'; $link = mysql_connect($server, $username, $password) or die('Could not connect: ' . mysql_error());

Re: [PHP] Include files....

2007-05-18 Thread Jason Pruim
On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ? Tijnema Well there it is... The Brain fart... Or

Re: [PHP] Include files....

2007-05-18 Thread Robert Cummings
On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a php file and needs to start with ?php and end with ?

Re: [PHP] Include files....

2007-05-18 Thread Tijnema !
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon brain fart... I guess you forget that defaults.php is a

Re: [PHP] Include files....

2007-05-18 Thread Robert Cummings
On Fri, 2007-05-18 at 22:31 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance for helping me through my obvious friday afternoon

Re: [PHP] Include files....

2007-05-18 Thread Tijnema !
On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 22:31 +0200, Tijnema ! wrote: On 5/18/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-05-18 at 16:20 -0400, Jason Pruim wrote: On May 18, 2007, at 4:12 PM, Tijnema ! wrote: Thanks in advance

Re: [PHP] Include files beneath pointed directory

2007-01-18 Thread Chris
Wikus Moller wrote: Hi. I have a windows server and I know this issue has been dealt with before but I can't find it, I want to include a file from a directory beneath or aside my home directory. Can I use the C:\directory\anotherdirectory\file.php in the include function like include

RE: [PHP] include files, .php or .inc ?

2004-11-22 Thread steve
Graham Cossey wrote: If you only have limited control/knowledge of Apache you could adopt names something like: script.inc.php In such a way PHP will always process the script as it's extension is .php and you can easily identify that it is a script to be included/required. FWIW, I use

Re: [PHP] include files, .php or .inc ?

2004-11-22 Thread Marek Kilimajer
Richard Davey wrote: Hello Perry, Sunday, November 21, 2004, 8:02:48 PM, you wrote: PJ What it the purpose of the .inc file then? Security - on a properly configured web server a .inc file will never actually try and compile/execute itself. Whereas a .php one always will. Yes, .inc files will show

Re: [PHP] include files, .php or .inc ?

2004-11-22 Thread Justin French
On 22/11/2004, at 7:02 AM, Perry Jönsson wrote: What it the purpose of the .inc file then? It gives you a way of knowing what's a directly executable file (like index.php) and what's an included file. Further, I disallow the direct serving of all .inc files in my htaccess, so that people can't

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Jon-Eirik Pettersen
Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Perry Jönsson
Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then? /Perry -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Jon-Eirik Pettersen
Perry Jönsson wrote: Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then? Not really anything. Just to

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Janet Valade
Perry Jönsson wrote: Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then? For organization. The file name

RE: [PHP] include files, .php or .inc ?

2004-11-21 Thread Graham Cossey
Perry Jönsson wrote: Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then?

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread John Holmes
Perry Jnsson wrote: Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? It makes no difference as far as PHP is concerned. You're just telling PHP what file to load. However, .inc files are generally served up as plain text

Re: [PHP] include files

2003-12-20 Thread Todd
This looks like it should do exactly what I need. Thanks for pointing that out. Marek Kilimajer wrote: See function debug_backtrace(), it's available since 4.3.3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] include files

2003-12-19 Thread Chris W. Parker
Todd mailto:[EMAIL PROTECTED] on Thursday, December 18, 2003 9:57 AM said: Is it possible under PHP4 to get the name of the file that a function was called from? To clarify, here's an example of what I'd like to do: [snip] Does anyone know of a way to do this? I've tried several

Re: [PHP] include files

2003-12-19 Thread Marek Kilimajer
See function debug_backtrace(), it's available since 4.3.3 Todd wrote: Hi, Is it possible under PHP4 to get the name of the file that a function was called from? To clarify, here's an example of what I'd like to do: --- main.php --- ?php include('include.php');

Re: [PHP] Include files

2003-02-26 Thread Ernest E Vogelsinger
At 01:34 26.02.2003, Kenneth Suralta said: [snip] How do I include external library files in PHP??? I would like to put the lines that are repeated in each php files, in a separate file. e.g. ?php $db_host = localhost; $db_port = 3306; $db_name = test; ...

Re: [PHP] Include files

2003-02-26 Thread David Eisenhart
if require is used to include the 'same file', say, twice that file will be loaded twice. This can of course cause errors (such as resulting from the redefinition of functions within this file). In contrast the require_once construct will only load a file 'once' irrespective of the number of times

RE: [PHP] Include files

2003-02-25 Thread John W. Holmes
How do I include external library files in PHP??? I would like to put the lines that are repeated in each php files, in a separate file. e.g. ?php $db_host = localhost; $db_port = 3306; $db_name = test; ... ? Just throw caution to the wind and try the include() function I'm not

Re: [PHP] Include files

2003-02-25 Thread Larry E. Ullman
How do I include external library files in PHP??? I would like to put the lines that are repeated in each php files, in a separate file. e.g. ?php $db_host = localhost; $db_port = 3306; $db_name = test; ... ? I find the include() function to be quite useful for including external files. Check

RE: [PHP] Include files

2003-02-25 Thread Bryan Lipscy
Funny thing about online manuals. include() http://www.php.net/manual/en/function.include.php include_once() http://www.php.net/manual/en/function.include-once.php Please read: http://www.catb.org/~esr/faqs/smart-questions.html -Original Message- From: Kenneth Suralta

Re: [PHP] Include files

2003-02-25 Thread Jinky Otacan Cocalon
the problem was solved by creating an include file and using using require() method i was just wondering what are the advantages and disadvantages of using require_once() instead of require()? thanx =) John W. Holmes wrote: How do I include external library files in PHP??? I would like to

Re: [PHP] include files and global variables

2002-07-21 Thread Michael Hall
I think that you need to call the checkMaster() function AFTER you declare it, not before. Try moving checkMaster(); beneath the function definition. Mick On Sun, 21 Jul 2002, Jon Wyatt wrote: I have some pages which include a number of files. In one of the include files I have a

RE: [PHP] include files or fopen

2002-06-30 Thread David Freeman
I am trying to write a program that is very modular in nature one of the features I need the user to be able to do is install/uninstall or enable/disable the module though the interface. I have, in the past, stored such information in a database. In projects that have need of such

Re: [PHP] Include Files self aware?

2002-04-30 Thread Billy S Halsey
Try this code (untested): function selfAwareInclude($filename) { define($filename, true); include($filename); } Inside your include file, make calls such as if (defined($filename)) { // Do whatever } Then use the selfAwareInclude() function instead of include(). You could do the

Re: [PHP] Include Files self aware?

2002-04-30 Thread mArk.cOLListER
The problem with this is you will loose the scope of your variables. So $filename will not have access to anything from where the function is called... -mark On Tue, 30 Apr 2002, Billy S Halsey wrote: Try this code (untested): function selfAwareInclude($filename) {

Re: [PHP] Include Files self aware?

2002-04-30 Thread Miguel Cruz
On Tue, 30 Apr 2002, PHP List wrote: Is it possible to detect if a file is being called as an include or require? ex: include(file.php)-- file.php code can detect that is has been called as an include. Compare $PHP_SELF with __FILE__, maybe? miguel -- PHP General Mailing List

RE: [PHP] Include Files self aware?

2002-04-30 Thread Maxim Maletsky \(PHPBeginner.com\)
-Original Message- From: mArk.cOLListER [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 2:00 AM To: php Subject: Re: [PHP] Include Files self aware? The problem with this is you will loose the scope of your variables. So $filename will not have access to anything from

RE: [PHP] include files with PHP 3.0.16

2001-04-16 Thread James Atkinson
Is there an equivalent to !--#include file="filename.inc"-- in PHP? And will it work in version 3.0.16. I've gone through the online manual but found nothing that would help in this situation. include("filename.inc"); or require("filename.inc"); http://www.php.net/include

Re: [PHP] include files with PHP 3.0.16

2001-04-16 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Tim Thorburn) wrote: Is there an equivalent to !--#include file="filename.inc"-- in PHP? And will it work in version 3.0.16. I've gone through the online manual but found nothing that would help in this situation.

RE: [PHP] include files with PHP 3.0.16

2001-04-16 Thread Stefan Kostopoulos
Tim, Check out the include() and require() function of php. Stefan -Original Message- From: Tim Thorburn [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 5:38 PM To: [EMAIL PROTECTED] Subject: [PHP] include files with PHP 3.0.16 Hi, I'm currently working on a rather large

Re: [PHP] Include Files

2001-04-04 Thread bizzk
html head title/title /head body ...your HTML page... br ? include("footer.html"); ? /body /html I got this from www.devshed.com (http://www.devshed.com/Server_Side/PHP/PHP101_1/page5.html). Check it out! See You, Bizzk ""Mike"" [EMAIL PROTECTED] schreef in bericht 9afcj1$o9l$[EMAIL

RE: [PHP] Include Files

2001-04-04 Thread Boget, Chris
I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the !--#include virtual="Nav.htm" -- the php gets ignored.Is there a way of doing this without using the php include function? Set up the .shtml extension so that it is parsed as PHP.

Re: [PHP] Include Files

2001-04-04 Thread Christian Reiniger
On Wednesday 04 April 2001 17:08, you wrote: I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the !--#include virtual="Nav.htm" -- the php gets ignored.Is there a way of doing this without using the php include function? Thanks Stop

Re: [PHP] Include files

2001-04-04 Thread CC Zona
In article 9afah8$8d3$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Mike") wrote: I'm trying to use html "include" syntax in a php page.If I use .shtml the php gets ignored .If I use php the !--#include virtual="Nav.htm" -- the php gets ignored.Is there a way of doing this without using the php

Re: [PHP] Include files????

2001-04-02 Thread Felix Kronlage
On Mon, Apr 02, 2001 at 08:55:26AM -0300, Bruno Freire wrote: Anybody can tell me how can i do Include files? has the thought of looking up the manual at php.net crossed your mind? try searching php.net for include(), require() -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31

Re: [PHP] Include files

2001-02-12 Thread Alexander Wagner
Conover, Ryan wrote: I have an include file foo.inc. I want to call a function that is in another include file,say anotherfoo.inc, from the foo.inc. [..] can I call an include from another include? Sure. I tried the above but it fails opening the other include. Should I have the '

RE: [PHP] Include files

2001-02-12 Thread PHPBeginner.com
Yes, you can include foo.php which has another include in it and another and another they will all appear to you as a one single file. But, be careful though, do not reinclude them, or you'll create an infinite loop.. use include_once instead Sincerely, Maxim Maletsky Founder, Chief

Re: [PHP] include files

2001-02-05 Thread Steve Werby
"David VanHorn" [EMAIL PROTECTED] wrote: I know this works, in footer.inc, to pull up nomenu. ? include("/home/dvh/public_html/footer-nomenu.inc")? However, is there a more "generic" way to specify the server root as the path? I'd rather not expose my directory structure in the PHP code.

RE: [PHP] include files

2001-02-05 Thread Brian V Bonini
DOCUMENT_ROOT ??? http://php.net/manual/en/language.variables.predefined.php -Original Message- From: David VanHorn [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 12:16 PM To: [EMAIL PROTECTED] Subject: [PHP] include files I've got kind of a deep page structure,

RE: [PHP] include files

2001-02-05 Thread David VanHorn
At 12:50 PM 2/5/01 -0500, Brian V Bonini wrote: DOCUMENT_ROOT ??? http://php.net/manual/en/language.variables.predefined.php Ok, but having read the docs you pointed to (thanks), I still don't see how to use it in an include directive. I assume that since the vhost is specified to use

RE: [PHP] include files

2001-02-05 Thread Brian V Bonini
? include ($DOCUMENT_ROOT . "/footer-nomenu.inc"); ? -Original Message- From: David VanHorn [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 1:04 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] include files At 12:50 PM 2/5/01 -0500, Bria

Re: [PHP] include files

2001-02-05 Thread Christian Reiniger
On Monday 05 February 2001 18:15, David VanHorn wrote: I know this works, in footer.inc, to pull up nomenu. ? include("/home/dvh/public_html/footer-nomenu.inc")? However, is there a more "generic" way to specify the server root as the path? I'd rather not expose my directory structure in