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.
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 better than the other,
or is it just
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
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
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
- 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
- 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
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
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';
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());
echo 'Connected successfully BR';
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());
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
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 ?
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
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
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
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
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
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
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
Hello Marek,
Monday, November 22, 2004, 12:18:22 PM, you wrote:
MK Yes, .inc files will show up as they are - php source, db
MK username/password etc. So it's even less secure unless you forbid
MK serving them:
That would be the properly configured web server section of my post,
assuming this
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
--- Richard Davey [EMAIL PROTECTED] wrote:
MK Yes, .inc files will show up as they are - php source, db
MK username/password etc. So it's even less secure unless you
forbid serving them:
That would be the properly configured web server section of
my post, assuming this has been done they
Hello,
Does it make any difference if you include
(include/require/include_once/require_once) files with extension .inc
or .php?
Best regards,
Perry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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/)
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
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
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?
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.
Best regards,
Richard Davey
--
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
Here's the solution I came up with that works for the site:
code snippet
$display_block .= ?php\n;
$display_block .= \n include(\../nav/top_nav.html\);;
$display_block .= \n;
$display_block .= include(\../nav/side_nav.html\);;
$display_block .= \n?;
end code snippet
I am only
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
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');
function foo(){
$include_file=file_that_called_foo();
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
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');
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;
...
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
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;
...
?
Kenneth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
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
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
:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 4:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Include files
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
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
I have some pages which include a number of files.
In one of the include files I have a function which I wish to be executed
everytime the include file is loaded.
Therefore I place the function name in the include file at the top.
However, this function uses a session variable to decide
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
Hi,
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 though of 2 ways this could be done, either when the module is
installed it adds additional
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
Hi,
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.
Thanks,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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)
{
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
-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
Hi,
I'm currently working on a rather large site and have just completed the
navigation portion of it. I'd like to make use of server side includes so
that if I have to make changes down the road, I won't have to chance
potentially 100s of files. Normally I use !--#include
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
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.
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
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
Mike P
[EMAIL PROTECTED]
--
PHP General Mailing List
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
Mike P
[EMAIL PROTECTED]
--
PHP General Mailing
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
Mike P
[EMAIL PROTECTED]
--
PHP General Mailing
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
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
Mike P
[EMAIL PROTECTED]
--
PHP General Mailing
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.
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
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
Hi! My name is Bruno.
Anybody can tell me how can i do Include files?
I mean, Write a function in a file and after this just include this file
in the code, like
#include file.h of C++??
Thanks !!!
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
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.
//Foo.inc
include "c:\\...\\anotherfoo.inc";
//other code
//end of include
can I call an include from another include?
I tried the above but it fails opening the
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
'
Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 1:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Include files
I have an include file foo.inc. I want
"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.
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
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
?
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
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
74 matches
Mail list logo