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 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 (http://w
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 9BD
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 !!!
little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "Surfer!" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Monday, March 19, 2001 3:20 AM
Subject: [PHP] PHP - include / require
> I was wanting a set of pages generated by individual PHP scrip
Doesn't make a whole lot of sense to do so, but include virtual should
work just fine.
-Rasmus
On Wed, 21 Mar 2001, Christian Dechery wrote:
> Can't I
>
> or
> or
> ???
>
> I'm trying to, the script works fine if I load it normally, but as an include
> in a shtml (server parsed) file it alwa
>this will work, however:
>
>
>
>
>
>
that is the problem... THIS is not working...
I have my html file like this:
index.shtml
... stuff...
and it's not working... there are 4 "include virtual"'s on this page...
this would be the 5th... all of them work,why not this one?
_
>You could just do a rename *.shtml *.php under
>DOS or UNIX or cp *.shtml ./*.php then
>use some sort of regex program/function to replace
>the internal links.
I'm not willing to change my entire site (which have over 3.000 html files)
just because PHP can't do something... I'd rather work som
you can include through http ,I did it even remotly and it works fine but
slow, see in manual how to read files through http
-almir
""Christian Dechery"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Can't I
or
or
???
I'm trying to, the script wor
virtual (PHP 3, PHP 4 )
Perform an Apache sub-request
int virtual (string filename)
Virtual() is an Apache-specific function which is equivalent to in mod_include. It performs an
Apache sub-request. It is useful for including CGI scripts or .shtml files,
or anything else that you would parse thr
>When I first started playing with PHP I had been using SSI's. I tried
to
>find a way that I could get a file that contained SSI's and php to be
>parsed, but I haven't seen it done. In Apache it seems like it would be
>as
>easy as adding a handler that parses shtml files as php files, but that
>
When I first started playing with PHP I had been using SSI's. I tried to
find a way that I could get a file that contained SSI's and php to be
parsed, but I haven't seen it done. In Apache it seems like it would be as
easy as adding a handler that parses shtml files as php files, but that
causes
>you won't be able to use $PHP_SELF, and you will encounter problems with
>passing values via the querystring, but other than that you can use SSI
>to
>call a PHP page.
I don't really need any of this, the script is a simple 15-lines-of-code
image randomizer that shows a random image from a list.
>Is there a reason you not using PHP's include method
>to do this?
>Rename your shtml file to have a PHP extension, replace
>the SSI instructions with PHP functions. You should
>be good to go.
I don't wanna rename all my shtml files (which are a LOT) and change all
my links to .php in files like
Wow, error messages are getting better these days ;-)
Are you running PHP as a CGI interpreter or a server module?
-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2001 16:20
To: [EMAIL PROTECTED]
Subject: [PHP] include virtual, file or exec cgi
L PROTECTED]]
> Sent: Wednesday, March 21, 2001 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] include virtual, file or exec cgi?
>
>
> Can't I
>
> or
> or
> ???
>
> I'm trying to, the script works fine if I load it normally, but
> as an includ
Can't I
or
or
???
I'm trying to, the script works fine if I load it normally, but as an include
in a shtml (server parsed) file it always returns "error ocurred bla bla
bla".
What am I doing wrong?
. [ Christian Dechery ]
. Webdeveloper @ Tá Na Mesa!
. Listmaster @ Gaita-L
. http://ww
I was wanting a set of pages generated by individual PHP scripts to each
use one PHP script to generate the navigation links. However I'm not
winning - a suitable example would be much appreciated.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
On 18-Mar-01 Steve Wardell wrote:
> Say you have index.php and 20 lines into index.php you include file.inc and
> there's an error on line 30 of file.inc, but I'm pretty sure PHP would say
> there was an error on line 50 of index.php and not like 30 of file.inc. It
> doesn't keep track of include
Say you have index.php and 20 lines into index.php you include file.inc and
there's an error on line 30 of file.inc, but I'm pretty sure PHP would say
there was an error on line 50 of index.php and not like 30 of file.inc. It
doesn't keep track of included files as separate files that are called b
On 17-Mar-01 Steve Wardell wrote:
> I didn't know where else to post feature requests so I'll post it here.
> Could we get included files to not merely be sucked in to the file that is
> including it but still think of it as a distinctive file in terms of getting
> debug output for errors. The re
I didn't know where else to post feature requests so I'll post it here.
Could we get included files to not merely be sucked in to the file that is
including it but still think of it as a distinctive file in terms of getting
debug output for errors. The reasons for this are 2 fold:
1) You could se
try something like
define("CONFIGURATION", "YES");
in xyz-inc-1.php
if (CONFIGURATION != "YES") {
include("/xyz-inc-1.php");
in the script
--- Jack Sasportas <[EMAIL PROTECTED]>
wrote:
> Is there a workaround under php3 for include_once ?
>
> Thanks
>
>
___
there's a few worthy notes within user comments under include() in manual,
have a look here :
http://www.php.net/manual/en/function.include.php
regards,
philip
On Fri, 16 Mar 2001, Jack Sasportas wrote:
> Is there a workaround under php3 for include_once ?
>
> Thanks
>
> ___
> Is there a workaround under php3 for include_once ?
if( !$this_include_file_only_variable_declared ) {
$this_include_file_only_variable_declared = 1;
// your include script here
}
And if you attempt to include the file more than once
in a script, the IF() will resolve true and skip past
Is there a workaround under php3 for include_once ?
Thanks
___
Jack Sasportas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
include_once can handel http connection if
--disable-url-fopen-wrapper
is not compiled intophp or
allow_url_fopen = off
in php.ini
then you can use http, not https though, secure connections are not supported. also
not that when using include() this way that the script is accually executed
Hi!
I tried to use the php code, "include()" to have the ghost server to point
to the file in the origial server. And I got the error message instead.
>Warning: Failed opening 'https://www.whatever.com/DBconn.ini' for inclusion
>(include_path='.:/usr/local/lib/php.ini') in
>/home/website/ghost_
At 13:41 7/3/2001, Derek Sivers wrote:
>>Which is the main difference between include() and
>>require() functions?
>
>
>"include" is optional
>you can put it inside an "IF"
>like this:
>
>if (0)
> {
> /* THIS WILL NOT SHOW... */
> include "optional_file.php";
> }
>
>
>but "require" happen
>Which is the main difference between include() and
>require() functions?
"include" is optional
you can put it inside an "IF"
like this:
if (0)
{
/* THIS WILL NOT SHOW... */
include "optional_file.php";
}
but "require" happens every time,
even if it is inside an "IF" that does no
Which is the main difference between include() and
require() functions?
Thanks
Costis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
On Mon, 26 Feb 2001 13:29, JW wrote:
> I have created a config.php3 to store the connection of the database
> and some constant variable. Then, I created the other file
> functions.php3 and inculde config.php3 into this file for
> function.phps3 should use some variables inside the file config.php
I have created a config.php3 to store the connection of the database and
some constant variable. Then, I created the other file functions.php3 and
inculde config.php3 into this file for function.phps3 should use some
variables inside the file config.php3. However, I don't know why all the
variable
egards
best regards
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
- Original Message -
From: "Fabian Fabela" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 11:08 PM
Subject: [PHP] Include
Hello,
I have php 4.0.3pl1.
I am tr
You need to add a . (dot) to your include path in PHP.ini...
Cheers,
Maxim Maletsky
-Original Message-
From: Fabian Fabela [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Include
Hello,
I have php 4.0.3pl1.
I am trying to
ian Fabela" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 11:38 AM
Subject: [PHP] Include
Hello,
I have php 4.0.3pl1.
I am trying to install phorum (phorum.org).
In a php file (index.php in admin) there is the function include for a file
(commo
Hello,
I have php 4.0.3pl1.
I am trying to install phorum (phorum.org).
In a php file (index.php in admin) there is the function include for a file
(common.php), I get the following error.
Warning: Failed opening 'common.php' for inclusion (include_path='/usr/share/php') in
/home/web/vacagor
Chief 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
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
>
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 o
- Original Message -
From: "thor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 11:58 AM
Subject: Re: [PHP] include("blah.php?var=this"); doesn't work?!
> Any include page you use will au
> Uh, why? Adding ?asin$asin makes absolutely no sense in an include since
> included files share the same namespace as the parent file. You can
> simply do:
Er, Rasmus. Do you mean "scope"? You're usually right on target with your
comments, so I'm sure that's what you meant :-)
Speaking o
> Adding ?asin=$asin doesn't make much sense but
> do it like this:
>
> include('book_reviews.php?asin=' . $asin);
Which makes just as little sense. Included files share the same namespace
as the file doing the including. You don't pass arguments to included
files.
-Rasmus
--
PHP General Ma
You don't need to go through these hoops.
Any include page you use will automatically use any variable that has been set in the
master page.
Thus, all you need to do is include the book_reviews.php page, and the $asin variable
will work in that one IF it has been set in the master file. If it
Adding ?asin=$asin doesn't make much sense but
do it like this:
include('book_reviews.php?asin=' . $asin);
-Brian
> -Original Message-
> From: John Vanderbeck [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 08, 2001 12:27 PM
> To: [EMAIL
AIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 12:27 PM
Subject: [PHP] include("blah.php?var=this"); doesn't work?!
> I need to be able to do:
>
> if (isset($asin))
> {
> include("book_reviews.php?asin=$asin");
> }
>
Uh, why? Adding ?asin$asin makes absolutely no sense in an include since
included files share the same namespace as the parent file. You can
simply do:
$asin = 123;
include 'book_reviews.php';
And the $asin variable will be accessible to you book_reviews.php script.
-Rasmus
On Thu, 8 Feb 200
I need to be able to do:
This is embeded in one of my sites pages..However, the call with the var
added on won't work, it seems like its looking for a file with that whole
name. Does anyone know how I can do this?
- John Vanderbeck
- Admin, GameDesign
--
PHP General Mailing List (http://ww
On Monday 05 February 2001 18:15, David VanHorn wrote:
> I know this works, in footer.inc, to pull up nomenu.
>
>
> 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.
> I tried various versions of ../ and
> -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, Brian V Bonini wrote:
> >DOCUME
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 "/home
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
"David VanHorn" <[EMAIL PROTECTED]> wrote:
> I know this works, in footer.inc, to pull up nomenu.
>
>
> 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.
How about the environment variable $DOCUMENT_ROOT
I've got kind of a deep page structure, lots of subdirs.
I'm having trouble with an include directive.
The problem is a footer that I use on all pages, which resides in the base
directory.
The footer file includes another file, which I use if there is no menu.
footer.inc has menu, and includes fo
On Thursday 01 February 2001 19:07, Karl J. Stubsjoen wrote:
> I'm trying to pass back a link to the user in a textbox (so they can
> copy and paste it elsewhere), however my textbox is being parsed
> incorrectly by the browser because of the " quotes which happen in the
> link I'm passing - basi
If you want to put a " in an echo statement, you need to escape it first by
putting the / before it, like /"
The function addslashes does this for you.
CB
At 11:07 AM 2/1/01 -0700, Karl J. Stubsjoen wrote:
>Hello,
>
>I'm trying to pass back a link to the user in a textbox (so they can copy
>an
Hello,
I'm trying to pass back a link to the user in a textbox (so they can copy
and paste it elsewhere), however my textbox is being parsed incorrectly by
the browser because of the " quotes which happen in the link I'm passing -
basically the HTML for the text box is getting parsed together wit
> Any ideas? Work arounds? I am using PHP3.
Try:
$page = str_replace("?", "&", $page);
That'll change:
include.html?page=main.html?date=12
into:
include.html?page=main.html&date=12
So the variables get passed properly.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-
Hey,
I just signed up on this list. I've got a quick
question.
I am using an #include statment, and here it is:
include.html
---
---
so when I include it looks like this
---
include.html?page=main.html
---
That way the page shown in the include statement is
main.html
My problem comes when
, investigate
"Safe mode" this instant :)
adamw
- Original Message -
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
"Michael Zornek" <[EMAIL PROTECTED]>
Sent: Wednesday, Januar
*
- Original Message -
From: "Adam Wright" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Michael Zornek"
<[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 10:18 AM
Subject: Re: [PHP] include statement
> For your things (where you are including HTML
Wednesday, January 17, 2001 5:14 PM
Subject: Re: [PHP] include statement
> Adam(and everyone else who answers in 5 minutes, god i love this list),
>
> thanks for the help.
>
> Why is readfile more 'correct'?
>
> Just wondering?
> Mike
>
> At 5:07 PM +
Adam(and everyone else who answers in 5 minutes, god i love this list),
thanks for the help.
Why is readfile more 'correct'?
Just wondering?
Mike
At 5:07 PM + 1/17/01, Adam Wright wrote:
>This is because the PHP include statement is ment to include other blocks of
>PHP c
Michael Zornek wrote:
> which is scary cause this worked too:
>
> include("/usr/local/apache/conf/httpd.conf");
> ?>
>
> doesn't this seem like a huge security hole?
No. If you know can trust your scripts, this is possible, but trusted scripts
won't do any abuse, will they?
If you can't trust y
environments as well; this is also is
described in the manual.
php.net/manual
--Toby
- Original Message -
From: "Michael Zornek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 12:04 PM
Subject: [PHP] include statement
> I'
This is because the PHP include statement is ment to include other blocks of
PHP code, rather than bits of HTML. Hence, it includes things from anywhere
on the system. To include things from under your current htdocs directory,
use...
include($DOCUMENT_ROOT . "/includes/metatags.in
I'm a PHP newbie and am looking into using the include statement to
put things like the header and footer in so they are always the same.
I do this now with SSI. In SSI I'll use the following statement:
I like this cause it lets me use the same statement all over the site
and I don't have to
Thursday, January 11, 2001, 11:03:31 AM, you wrote:
BC>> Using PHP 3.0.18, every, single time I've used something like:
BC>> include('../farmers/underwear.php');
BC>> It works as expected.
BC> I'm half alseep. I see what you're saying. I suppose if you did:
BC> include('corn.php');
BC> It's going
(BC == "Brian Clark") [EMAIL PROTECTED] writes:
R>> Thanks for the info Brian. But what about the path you have in the
R>> include statement? IE: include "../path1/file.php"
R>> Does it ignore the path? Try the path? Or just append that path to
R>> the end of each path in the include_path?
BC>
Hello Randy,
(R == "Randy") [EMAIL PROTECTED] writes:
R> Thanks for the info Brian. But what about the path you have in the
R> include statement? IE: include "../path1/file.php"
R> Does it ignore the path? Try the path? Or just append that path to
R> the end of each path in the include_path?
Randy wrote:
>
> Thanks for the info Brian. But what about the path you have in
> the include statement? IE: include "../path1/file.php"
>
> Does it ignore the path? Try the path? Or just append that path
> to the end of each path in the include_path?
>
> Best regards,
> Randy
My experience i
Thanks for the info Brian. But what about the path you have in
the include statement? IE: include "../path1/file.php"
Does it ignore the path? Try the path? Or just append that path
to the end of each path in the include_path?
Best regards,
Randy
Wednesday, January 10, 2001, 5:06:44 PM, yo
Thanks for the info Brian. But what about the path you have in
the include statement? IE: include "../path1/file.php"
Does it ignore the path? Try the path? Or just append that path
to the end of each path in the include_path?
Best regards,
Randy
Wednesday, January 10, 2001, 5:06:44 PM, yo
In article <[EMAIL PROTECTED]>, "Randy"
<[EMAIL PROTECTED]> wrote:
I would be willing to bet that within the php.ini file, an entry such
as you listed would look for includes in:
if foo = location of php.ini e.g. /usr/local/lib/php.ini,
then ../include relative to foo is /usr/local/include/
s
Hello Randy,
(R == "Randy") [EMAIL PROTECTED] writes:
R> How I think it SHOULD work is like DOS - First it looks at where
R> you say it is. If not there, it looks in the current directory.
Let's not forget Unix. ;-)
R> If not there, it looks in the directories in the path. I'm sure PHP
R> do
t; drop it in, it will work...
W>>
W>> -Original Message-
W>> From: Randy [mailto:[EMAIL PROTECTED]]
W>> Sent: Monday, January 08, 2001 2:02 PM
W>> To: [EMAIL PROTECTED]
W>> Subject: [PHP] include path confusion
W>> I'm confused on what shou
I have just been playing around with include and include_once with one of
my classes, basicly there are a lot of functions inside this class so we
have put the contance of the function into its own file (so that different
people can work on it) and are useing the include function to call it.
exa
I've setup apache 1.3.14 with php 4.0.4. I'm getting an error when trying to
include/require files.
Failed opening 'tcalendar2.inc' for inclusion (include_path='./') in
c:/apache/htdocs/caltest2.phtml
I tried changing the include path in php.ini to 'c:/Apache/htdocs' to
'c:\Apache\htdocs' to '
901 - 977 of 977 matches
Mail list logo