Lately I have noticed many scripts that all consist of one file even though
they create the appearance of many pages. For example, you would open
setup.php and a form would appear. Then after you complete the form a new
page appears with the results of your form, however the URL is still
setup.php
I have a directory with php files that I incorporate into my website as
libraries via a php_include() call, I would like the path to include my
library directory so I can include the library files from any directory.
There is no way to overload php's include path on a user by user basis?
Thanks
My main question would be the performance advantage (if any) of
including functions only when needed..instead of leaving them all in one
file..and if php would include it even if the function is never called
...anyone.
Dan
+--
I am looking for a simple way to include a file and not have it parsed.
But I also do no want to strip out the html and php. Is there a way
to do a nice and simple include and set parsing to false?
Right now I use a fopen and fgets to read from the file.
include() will parse it and execute it.
Hi Sebastian!
> Lately I have noticed many scripts that all consist of one
> file even though
> they create the appearance of many pages. For example, you would open
> setup.php and a form would appear. Then after you complete
> the form a new
> page appears with the results of your form, howev
> Well, I think I should give a better explanation. I have been
> seeing a lot
> of scripts that appear to be on multiple pages. For example:
> You open file.php, and you are greeted with a form asking
> your name. You
> give in your name and then submit the form. After you submit
> the form y
Assume the following file is named "this_script.php":
This is all in ONE file.
\n";
do some other stuff
exit;
}
?>
-Original Message-
From: Sebastian A. [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 4:19 AM
To: PHP General List (PHP.
Hi
You can do something like this:
ini_set ("include_path",ini_get("include_path").":second_include_path");
Tom
At 07:05 AM 10/04/2002, Robert Abbate wrote:
>I have a directory with php files that I incorporate into my website as
>libraries via a php_include() call, I would like the path to inc
Hi
That goes into each php page. It gets the standard phpinclude directory
then appends your local one using ":" as the seperator.
It does not affect any other php pages only the one it is used in.
Tom
Where do you place that function call? In the script you're running, or in
the php.ini file?
Th
Alex Black, Head Monkey
[EMAIL PROTECTED]
The Turing Studio, Inc.
http://www.turingstudio.com
vox+510.666.0074
fax+510.666.0093
Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522
> From: [EMAIL PROTECTED] (Dan Phoenix)
> Newsgroups: php.general
> Date: 11
:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 10:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] includes
My main question would be the performance advantage (if any) of
including functions only when needed..instead of leaving them all in one
file..and if php would include it even if the function is
Hi, i just finished my first really big project and when it went live
the servers just flipped out, 100% CPU Load.
Removing all includes and pasting all libraries together seemed to do
the trick, CPU went back to normal.
My Question:
What can i do to speed up includes, i hate working on a file wi
On Tue, 13 Mar 2001 13:45, Rick St Jean wrote:
> I am looking for a simple way to include a file and not have it parsed.
> But I also do no want to strip out the html and php. Is there a way
> to do a nice and simple include and set parsing to false?
>
> Right now I use a fopen and fgets to read
How embarassing... I read about that and forgot about it.
It is a matter a getting aquainted with new syntax.
Thanks.
Rick
At 01:52 PM 3/13/01 +1030, David Robley wrote:
>On Tue, 13 Mar 2001 13:45, Rick St Jean wrote:
> > I am looking for a simple way to include a file and not have it parsed.
>
2001 10:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] includes
I am looking for a simple way to include a file and not have it parsed.
But I also do no want to strip out the html and php. Is there a way
to do a nice and simple include and set parsing to false?
Right now I use a fopen and fgets to
ssage-
> From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 10:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] includes
>
>
> I am looking for a simple way to include a file and not have it parsed.
> But I also do no want to strip out the html
il)
Subject: Re: [PHP] includes
On Tue, 13 Mar 2001 13:54, Chris Cocuzzo wrote:
> I'm slightly confused as to why you would not want it parsed and
> executed...or I should say...what would be the differences in using the
> include function vs. reading it in like a file??
>
&
---Original Message-
> > From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, March 12, 2001 10:15 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] includes
> >
> >
> > I am looking for a simple way to include a file and not have it parsed.
>
I am trying to separate html from php code. For more complicated pages I
intend to generate classes..but before I start doing that is there a
quick way to include html code that contains variables ? if the main
page has already defined those variables, are they going to be
automatically replaced?
e those files for portions of html..I know it must be
something simple..
Paul
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 5:30 PM
To: 'Pax'; [EMAIL PROTECTED]
Subject: RE: [PHP] includes and variables
think of an included
Replace include with include_once where you can.
Best regards,
Andrew
> -Original Message-
> From: Jens Kisters [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 11:08 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] includes slooow
>
>
> Hi, i just fini
think of an included file as if it were part of the parent code.
so
file1.php
file2.php
file2.php would basically be:
HTH
Martin
-Original Message-
From: Pax [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 9:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP] includes and
try changing the file table1.php to:
..
-Original Message-
From: Pax [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 11:02 AM
To: [EMAIL PROTECTED]
Subject: [PHP] includes and variables
Tks Martin,
I guess I am doing something wrong.. I have the main document like
> I just discovered PHP this week. I'm reading about include statements. If
I
> have a text file 2000 characters in length that I want to include, I would
> do this to include to whole file:
>
> include ("file.txt");
> ?>
http://php.net/fopen
http://php.net/fread
Note that include not only in
On Friday 03 August 2001 05:59, Craig Westerman wrote:
> $txtfile = fopen("text.txt", "r");
>
> while (!feof($filePointer))
$txtfile instead of $filePointer
> {
> $line = fgets($txtfile, 250);
fgets reads a line (i.e. up to a newline) with at most the specified
numbers of characters. So
OPen the file and read in the required number of characters (short
explanation). Have a look at the file handling functions.
--
David Robley
Thanks David,
I came up with this, but it doesn't work. Does text file need to be in a
special format? It is 4 paragraphs of plain text created in notepa
On Fri, 3 Aug 2001 10:16, Craig Westerman wrote:
> Hello all,
>
> I just discovered PHP this week. I'm reading about include statements.
> If I have a text file 2000 characters in length that I want to include,
> I would do this to include to whole file:
>
> include ("file.txt");
> ?>
>
> What w
Hi,
Has anyone experience of using Dreamweaver library item files (.lbi)s as
php includes?
We've got a standard header and footer to go across all pages on a site with
the navigation etc. We want both the designers, (using Dreamweaver), and the
php programmers to have access to these inc
lumns/sascha19990316.php3
for more information.
I hope this helps.
Robert Zwink
http://www.zwink.net/daid.php
-Original Message-
From: George Whiffen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php includes === Dreamweaver
gt; http://www.phpbuilder.com/columns/sascha19990316.php3
> for more information.
>
> I hope this helps.
>
> Robert Zwink
> http://www.zwink.net/daid.php
>
> -Original Message-
> From: George Whiffen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 0
dvantages of CachedFastTemplate which is reason alone to
use templates.
If you decide to try it out, I'm happy to relay my experiences.
Robert V. Zwink
http://www.zwink.net/daid.php
-Original Message-
From: George Whiffen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 2:
are designing
a templating system from scratch for php4, you could get a lot more functionality
for less work now e.g. it would be easy to allow full embedding of php, by just
carrying out the template parse after the first round of php processing rather
than before.
d) Dreaweaver library files/p
ng control
If you do not use CachedFastTemplate, then I would certainly look into using
the buffered output for caching. Aside from cachinc, I have no further
experience with output buffering.
d) Dreaweaver library files/php includes
This indeed will remain an awkward arrangement. Possible? Yes,
never been an issue.
>
> c) Implications of php4 output buffering control
> If you do not use CachedFastTemplate, then I would certainly look into using
> the buffered output for caching. Aside from cachinc, I have no further
> experience with output buffering.
>
> d) Dreawea
In that case, forget what I said ';)
But since you can't say this enough, here is it once more:
*** Always remember to keep those includes *out of* your document root;
This prevents accidental displaying of source code or
(which I heard on this list could even be worse) out-of-context executio
35 matches
Mail list logo