Shawn McKenzie wrote:
> Daniel Kolbo wrote:
>> Hello,
>>
>> I've cleaned up my question a bit.
>>
>> I want the included file which is called within a method of a class to
>> have the same scope as the instantiation of the class's object. That
>> is, i want a class to include a file in the calling
Daniel Kolbo wrote:
> Hello,
>
> I've cleaned up my question a bit.
>
> I want the included file which is called within a method of a class to
> have the same scope as the instantiation of the class's object. That
> is, i want a class to include a file in the calling object's scope. How
> would
Hello,
I've cleaned up my question a bit.
I want the included file which is called within a method of a class to
have the same scope as the instantiation of the class's object. That
is, i want a class to include a file in the calling object's scope. How
would one do this?
'test.php'
cinclude()
Martin Scotta wrote:
> Where is $vars? there is no $vars in your code...
>
> You can extract all the global space in the CScope method, it's quite
> simple, but less performant.
>
>
> class CScope {
>
>public $vars = 'class scope\n';
>
>function cinclude($filename) {
>
Hello,
I understand the why $vars is not in the global scope, but i was
wondering if there was a way from within the class file to include a
file in the parent's scope?
i tried ::include('vars.php'), parent::include('vars.php'), but this
breaks syntax...
Please consider the following three files
How does one deal with tag completion from an include file to the
main(source)-file?
i.e. c should a tag, such as or be closed withing the
include file? Or can be started in the include file and closed in
the main-file?
Crossing the border, so-to-speak, doesn't seem to matter; but how does
this
From: Patrick Moloney
>
> I have a simple web site with a simple page that all works well,
> although I have had a similar problem a couple of times that seems to
be
> caused by Comment Lines in the included files. I wonder if I have it
> entirely right.
> All my files are .php files, but almos
Patrick Moloney wrote:
I have a simple web site with a simple page that all works well,
although I have had a similar problem a couple of times that seems to be
caused by Comment Lines in the included files. I wonder if I have it
entirely right.
All my files are .php files, but almost all the
Patrick Moloney wrote:
Does PHP preprocess the file but treat the comments as text because I
never said it was HTML?
I've not had it do that.
Would PHP comments have to be inside PHP tags?
Yes. If you use a php comment it has to be inside a php tag.
One issue I have seen though is xml/x
I have a simple web site with a simple page that all works well,
although I have had a similar problem a couple of times that seems to be
caused by Comment Lines in the included files. I wonder if I have it
entirely right.
All my files are .php files, but almost all the code is HTML.
The file f
On 5/25/07, Richard Davey <[EMAIL PROTECTED]> wrote:
Hi Tijnema,
Friday, May 25, 2007, 5:58:46 PM, you wrote:
> On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
>> Very. Each directory contains very specific types of code/content.
>> Tracking down where any given function, class, custom t
Hi Tijnema,
Friday, May 25, 2007, 5:58:46 PM, you wrote:
> On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
>> Very. Each directory contains very specific types of code/content.
>> Tracking down where any given function, class, custom tag, behaviour,
>> etc is defined is extremely simple.
>
On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
On Fri, 2007-05-25 at 18:20 +0200, Tijnema wrote:
> On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Fri, 2007-05-25 at 18:04 +0200, Tijnema wrote:
> > > On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > On Fri, 2007
On Fri, 2007-05-25 at 18:20 +0200, Tijnema wrote:
> On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Fri, 2007-05-25 at 18:04 +0200, Tijnema wrote:
> > > On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > On Fri, 2007-05-25 at 17:07 +0200, Tijnema wrote:
> > > > > I like to
On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
On Fri, 2007-05-25 at 18:04 +0200, Tijnema wrote:
> On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Fri, 2007-05-25 at 17:07 +0200, Tijnema wrote:
> > > I like to keep it simple, just like this:
> > > /
> > > /data
> > > /
On Fri, 2007-05-25 at 18:04 +0200, Tijnema wrote:
> On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Fri, 2007-05-25 at 17:07 +0200, Tijnema wrote:
> > > I like to keep it simple, just like this:
> > > /
> > > /data
> > > /http
> > > /project1
> > > /includes
> > >
On 5/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
On Fri, 2007-05-25 at 17:07 +0200, Tijnema wrote:
> On 5/25/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> >
> > > -Original Message-
> > > From: Tijnema [mailto:[EMAIL PROTECTED]
> > > > >
> > > > > It's just the way you write script, m
On Fri, 2007-05-25 at 17:07 +0200, Tijnema wrote:
> On 5/25/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> >
> > > -Original Message-
> > > From: Tijnema [mailto:[EMAIL PROTECTED]
> > > > >
> > > > > It's just the way you write script, my included files contain only
> > > > > functions & varia
On 5/25/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> -Original Message-
> From: Tijnema [mailto:[EMAIL PROTECTED]
> > >
> > > It's just the way you write script, my included files contain only
> > > functions & variables, no executing code. 99% I have a class around
> > > it.
> > > If you
> -Original Message-
> From: Tijnema [mailto:[EMAIL PROTECTED]
> > >
> > > It's just the way you write script, my included files contain only
> > > functions & variables, no executing code. 99% I have a class around
> > > it.
> > > If you write it like that, than there's no problem with ex
On Fri, 2007-05-25 at 16:17 +0200, Tijnema wrote:
> On 5/25/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> > Why are your include files in your web root in the first place? Move them
> > elsewhere on your filesystem and then it's not even possible to access them
> > via the web.
> >
> > Edward
> >
> O
On 5/25/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> -Original Message-
> From: Tijnema [mailto:[EMAIL PROTECTED]
> Sent: 25 May 2007 15:00
> To: tedd
> Cc: Kevin Murphy; Stephen; php
> Subject: Re: [PHP] Include file questions
>
>
> On 5/25/07, tedd &l
> -Original Message-
> From: Tijnema [mailto:[EMAIL PROTECTED]
> Sent: 25 May 2007 15:00
> To: tedd
> Cc: Kevin Murphy; Stephen; php
> Subject: Re: [PHP] Include file questions
>
>
> On 5/25/07, tedd <[EMAIL PROTECTED]> wrote:
> > At 1:55 PM -0700
On Fri, 2007-05-25 at 16:00 +0200, Tijnema wrote:
> On 5/25/07, tedd <[EMAIL PROTECTED]> wrote:
> > At 1:55 PM -0700 5/23/07, Kevin Murphy wrote:
> > >.inc files have a disadvantage in that if you view the file:
> > >
> > >http://www.yoursite.com/file.inc
> > >
> > >you can see the php code. I pref
On 5/25/07, tedd <[EMAIL PROTECTED]> wrote:
At 1:55 PM -0700 5/23/07, Kevin Murphy wrote:
>.inc files have a disadvantage in that if you view the file:
>
>http://www.yoursite.com/file.inc
>
>you can see the php code. I prefer not to use those just on the off
>chance that someone can see my code a
At 1:55 PM -0700 5/23/07, Kevin Murphy wrote:
.inc files have a disadvantage in that if you view the file:
http://www.yoursite.com/file.inc
you can see the php code. I prefer not to use those just on the off
chance that someone can see my code and use that as the basis for
figuring out a way
On Wed, May 23, 2007 3:48 pm, Stephen wrote:
> 1) Does the filename extension matter? I prefer *.inc? It seems to
> work fine, but I only see others using *.php
>From a strictly "will it work" stand-point, the extension can be
anything you want or none at all.
HOWEVER, there are various security
Stephen escribió:
1) Does the filename extension matter? I prefer *.inc? It seems to work fine,
but I only see others using *.php
2) Does the include file need an opening ?
Not big issues, but I am curious.
Thanks
Stephen
If you use .inc extension you will have to modi
Kevin Murphy <[EMAIL PROTECTED]> wrote: .inc files have a disadvantage in that
if you view the file:
http://www.yoursite.com/file.inc
you can see the php code. I prefer not to use those just on the off chance
that someone can see my code and use that as the basis for figuring out a wa
.inc files have a disadvantage in that if you view the file:
http://www.yoursite.com/file.inc
you can see the php code. I prefer not to use those just on the off
chance that someone can see my code and use that as the basis for
figuring out a way to exploit it (especially true of password fi
1) Does the filename extension matter? I prefer *.inc? It seems to work fine,
but I only see others using *.php
2) Does the include file need an opening ?
Not big issues, but I am curious.
Thanks
Stephen
StainOnRug wrote:
> Hello I am a beginner at PHP. I searched for my ? but couldn’t pinpoint it..
> My question is, How do I upload include files onto my website include
> directory. Im hosted through Yahoo, I am not running a server on my
> computer. When I check out my PHP info it tells me the in
- become Carbon Free
-Original Message-
From: StainOnRug [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 25, 2007 12:57 AM
To: php-general@lists.php.net
Subject: [PHP] Include file path.. please help im newby
Hello I am a beginner at PHP. I searched for my ? but couldn't pinpoint it.
Hello I am a beginner at PHP. I searched for my ? but couldn’t pinpoint it..
My question is, How do I upload include files onto my website include
directory. Im hosted through Yahoo, I am not running a server on my
computer. When I check out my PHP info it tells me the include dir is
include path
On Mon, February 5, 2007 10:09 am, Craige Leeder wrote:
> On 2/5/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> If you want to avoid the overhead of include_once, it's a pretty
>> common practice (borrowed from C .h files) to do:
>
> Just out of curiosity, how much additional overhead are we talki
On 2/5/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
If you want to avoid the overhead of include_once, it's a pretty
common practice (borrowed from C .h files) to do:
Just out of curiosity, how much additional overhead are we talking about?
--
PHP General Mailing List (http://www.php.net/)
To
Richard Lynch wrote:
> On Sat, February 3, 2007 7:05 pm, Eli wrote:
>> Does any included file in PHP have a unique identifier? (like a stack
>> of
>> includes identifier).
>
> Down in the guts of PHP source, there may be some kind of file handler
> which is unique...
Actually, that's what I need.
On Sat, February 3, 2007 7:05 pm, Eli wrote:
> Does any included file in PHP have a unique identifier? (like a stack
> of
> includes identifier).
Down in the guts of PHP source, there may be some kind of file handler
which is unique...
But nothing I'm aware of exposes this to code in any way,
ot
On Sun, 2007-02-04 at 03:27 +0200, Eli wrote:
> Robert Cummings wrote:
> > Looking at the code above... it would seem you want:
> >
> > include_once()
> It's not the idea..
>
> I'm not trying to make that code work, I want to know which exact
> include (of the same file) does what..
>
> Say
On Saturday 03 February 2007 7:27 pm, Eli wrote:
> Robert Cummings wrote:
> > Looking at the code above... it would seem you want:
> >
> > include_once()
>
> It's not the idea..
>
> I'm not trying to make that code work, I want to know which exact
> include (of the same file) does what..
Huh?
Robert Cummings wrote:
Looking at the code above... it would seem you want:
include_once()
It's not the idea..
I'm not trying to make that code work, I want to know which exact
include (of the same file) does what..
Say you got a loop of self-include:
e.g:
=== a.php
In "(id=X)!".. wha
On Sun, 2007-02-04 at 03:05 +0200, Eli wrote:
> Hello,
>
> Does any included file in PHP have a unique identifier? (like a stack of
> includes identifier).
>
> If the files names are different, then __FILE__ can be used as an
> identifier. But if a file was included by itself, then __FILE__ is
Hello,
Does any included file in PHP have a unique identifier? (like a stack of
includes identifier).
If the files names are different, then __FILE__ can be used as an
identifier. But if a file was included by itself, then __FILE__ is the
same, tho there are 2 different includes of the same
I am not sure about this but the requirement is that even the links
associated with the image changes with the image. Like an image of
restaurant links to restaurants page and image for pubs links to pubs page.
Is this achievable through this code. I could not test it coz it was not
working. Can y
At 9:44 AM -0800 1/13/07, Chris Carter wrote:
Hi,
Here is code that I got from the internet for random image. This file works
perfect if I try it independently but not on any existing file. I think the
error that I am getting is quite common on the net but its new for me.
I am getting this erro
Chris Carter wrote:
> Hi,
>
> I have used this file in my index file. When I run this file separately it
> shows the random image but not when I include on my index.php.
your image script shouldn't be included in your [index] page.
instead it should be referenced by the src attribute of an img
ta
Hi,
I have used this file in my index file. When I run this file separately it
shows the random image but not when I include on my index.php.
Thanks in advance,
João Cândido de Souza Neto wrote:
>
> Is it the whole code of your file, or is there any other html code?
>
> "Chris Carter" <[EMAI
At 6:15 PM +0900 4/8/06, kmh496 wrote:
hi,
my webroot is
/a/b/current/
i am in /a/b/current/d/file.php
file.php has a line
require_once ($_SERVER[document_root]."/d/common.php");
it finds the file, but the variables inside common.php are not set and
don't exist in file.php
where is my mista
Claudio wrote:
Is it possible to process the file in second php instance?
An only get its output?
yes - but its heavy to do (which ever way you do it).
basically you need to either call a commandline php script
via exec() (or something similar) e.g.
exec('php /path/2/your/script.php'); // rea
Is it possible to process the file in second php instance?
An only get its output?
Claudio
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> first off I would recommend that you 'pollute' your global scope as
> little as possible.
I agree at all! Thats my opinion, and i don't use global variables at all.
The problem is, other people do. And if I need to use their code I must
include it.
> that said the solution will probably involv
Claudio wrote:
Hi,
I'm using PHP 5. I have a class operation that includes php files.
Is there a way to include this files to global scope? So that difined vars
and functions are global accesseble?
first off I would recommend that you 'pollute' your global scope as little as
possible.
seco
Hi,
I'm using PHP 5. I have a class operation that includes php files.
Is there a way to include this files to global scope? So that difined vars
and functions are global accesseble?
I saw that some PHP functions have a context parameter, is something like
this in "eval" or "include" possible?
On Sat, 2005-05-21 at 06:30, Ross wrote:
> I have the folowing code which checks whether the user has logged in.
>
> if (!isset ($_SESSION['new_session'] ) )
> {
>
> $login_status = "Your are not signed in
> ";
>
> }
> if (isset ($_SESSION['new_session'] ) )
> {
> $address = $_SESSION['new_sess
Make sure you don't have any blankspace before or after the
in your stats.php file. That's usually what does it.
On Sat, 21 May 2005, Ross wrote:
I have the folowing code which checks whether the user has logged in.
if (!isset ($_SESSION['new_session'] ) )
{
$login_status = "Your are not s
I have the folowing code which checks whether the user has logged in.
if (!isset ($_SESSION['new_session'] ) )
{
$login_status = "Your are not signed in
";
}
if (isset ($_SESSION['new_session'] ) )
{
$address = $_SESSION['new_session'];
$login_status = "Your are signed in as $address";
}
?>
N
On Wed, March 30, 2005 2:31 pm, [EMAIL PROTECTED] said:
>> ..."Scripts using single quotes run slightly faster because the PHP
>> parser can include the string directly. Double quoted strings are
>> slower because they need to be parsed."...
This is PATENTLY FALSE, at least in part.
PHP *must* pa
xfedex wrote:
Here is my test in a PIII 550Mhz 128mb with gentoo:
for ($i = 0; $i <= ; $i++) {
$include = 'db_connect.php';
include('include/'.$include);
}
3.623316 seconds
--
for ($i = 0; $i <= ; $i++) {
$include = "db_connect.php";
On Wed, 30 Mar 2005 16:45:32 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
> Because I'm bored, I decided to test the theory.
>
> AMD 3200xp
> 1.5gb Memory
> RHEL AS 3
>
> I ran the test 20 times, and 18 of those times, double quotes were
> faster than single quotes. Don't always trust what you
php-general@lists.php.net
cc:
Subject: Re: [PHP] Include file
On Wed, 30 Mar 2005 15:14:27 -0600, Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
> > Why is it faster? And why should you avoid using double quotes?
> >
>
> ..."Scripts usi
Because I'm bored, I decided to test the theory.
AMD 3200xp
1.5gb Memory
RHEL AS 3
I ran the test 20 times, and 18 of those times, double quotes were
faster than single quotes. Don't always trust what you read. Not to
mention the fact that the 'faster' of the two was 'faster' by an average
of
Hello Jay,
Wednesday, March 30, 2005, 10:14:27 PM, you wrote:
JB> I try to use both types of quotes in the proper circumstance.
JB> Having said that, I came to computing in the age where we worried
JB> over CPU cycles, but I don't see how in this day and age the
JB> difference between the two wou
Jay Blanchard wrote:
I try to use both types of quotes in the proper circumstance. Having
said that, I came to computing in the age where we worried over CPU
cycles, but I don't see how in this day and age the difference between
the two would even matter. Even on a high load site the difference
be
On Wed, 30 Mar 2005 15:14:27 -0600, Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
> > Why is it faster? And why should you avoid using double quotes?
> >
>
> ..."Scripts using single quotes run slightly faster because the PHP
> parser can include the string directly. Double quoted strings are
Jay Blanchard wrote:
I try to use both types of quotes in the proper circumstance. Having
said that, I came to computing in the age where we worried over CPU
cycles, but I don't see how in this day and age the difference between
the two would even matter. Even on a high load site the difference
be
[snip]
> Why is it faster? And why should you avoid using double quotes?
>
..."Scripts using single quotes run slightly faster because the PHP
parser can include the string directly. Double quoted strings are
slower because they need to be parsed."...
Quoted from:
http://www.zend.com/zend/tut/us
"xfedex" <[EMAIL PROTECTED]>,
cc:
Subject:RE: [PHP] Include file
[snip]
This way is faster:
include('..includes/' . $include);
Its always better to avoid using doublequotes.
[/snip]
Why is it faster? And why should you avoid usin
> Why is it faster? And why should you avoid using double quotes?
>
..."Scripts using single quotes run slightly faster because the PHP
parser can include the string directly. Double quoted strings are
slower because they need to be parsed."...
Quoted from:
http://www.zend.com/zend/tut/using-str
[snip]
This way is faster:
include('..includes/' . $include);
Its always better to avoid using doublequotes.
[/snip]
Why is it faster? And why should you avoid using double quotes?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This way is faster:
include('..includes/' . $include);
Its always better to avoid using doublequotes.
meatbread.
On Tue, 29 Mar 2005 20:55:17 -0500, James Pancoast <[EMAIL PROTECTED]> wrote:
> Try it with double quotes instead:
>
> include( "../includes/$include" );
>
> That way works for me.
Try it with double quotes instead:
include( "../includes/$include" );
That way works for me.
And I also hope you're cleansing or filtering $include in some way.
On Tue, 29 Mar 2005 19:41:15 -0600, Marquez Design
<[EMAIL PROTECTED]> wrote:
> Does anyone know how to include a variable page? The
Hello Marquez,
Wednesday, March 30, 2005, 2:41:15 AM, you wrote:
MD> Does anyone know how to include a variable page? The variable is a page
MD> name. Such as "inluded_file.html"
MD> Include ('../includes/$include');
MD> Does not seem to work.
You cannot use variables inside single quotes. Try
Does anyone know how to include a variable page? The variable is a page
name. Such as "inluded_file.html"
Include ('../includes/$include');
Does not seem to work.
Thanks!
--
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> On Tuesday 12 November 2002 15:55, Fikret CAN wrote:
> > hello PHP developers,
> >
> > I am going to convert a site that works with frames to the equivalent
with
> > includes. I have several template files whic behaves according to query
> > string parameters. I don't want to make big changes, ju
On Tuesday 12 November 2002 15:55, Fikret CAN wrote:
> hello PHP developers,
>
> I am going to convert a site that works with frames to the equivalent with
> includes. I have several template files whic behaves according to query
> string parameters. I don't want to make big changes, just make it w
hello PHP developers,
I am going to convert a site that works with frames to the equivalent with includes. I
have several template files whic behaves according to query string parameters. I don't
want to make big changes, just make it work.
Is that possible?
I lasltly consider the solutions th
to remove before you construct the query. A comma on the first line and a
semicolon on the second line.
Janet
- Original Message -
From: "Paul Fowler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 17, 2002 8:17 PM
Subject: [PHP] Include file for
I am very new at this and am having trouble migrating to php and mysql from
a different system (WebCatalog).
I want to start dumping files to text and let php use them to populate mysql
on the fly as I start migrating.
snip---
$db = mysql_pconnect("host", "u
> How can I include any html or php file via .htaccess .
>
> I want to include an html file in a site contaning around 1000 pages. I want
> to add header & footer dynamically on these pages .
> Is there any way to include header & footer on these pages using .htaccess
> file.
php_value auto_prep
Hello,
How can I include any html or php file via .htaccess .
I want to include an html file in a site contaning around 1000 pages. I want
to add header & footer dynamically on these pages .
Is there any way to include header & footer on these pages using .htaccess
file.
thanks in advance
ke
Hello,
How can I include any html or php file via .htaccess .
I want to include an html file in a site contaning around 1000 pages. I want
to add header & footer dynamically on these pages . Is there any way to
include header & footer on these pages using .htaccess file.
thanks in advance
ke
thanks for that , it is working fine.
keyur
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Keyur Kalaria" <[EMAIL PROTECTED]>
Cc: "php" <[EMAIL PROTECTED]>
Sent: Saturday, April 21, 2001 9:18 PM
Subject: Re:
s)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Keyur Kalaria [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 22, 2001 12:51 AM
To: php
Subject: [PHP] include file using .htaccess
Hello,
How can I include any html or php file via .htaccess ?
I want to include an html file
Make sure AllowOverride includes Options and put these lines in your
.htaccess:
php_value auto_prepend_file header.html
php_value auto_append_file footer.html
-Rasmus
On Sat, 21 Apr 2001, Keyur Kalaria wrote:
> Hello,
>
> How can I include any html or php file via .htaccess ?
>
> I want to inc
Hello,
How can I include any html or php file via .htaccess ?
I want to include an html file in a site contaning around 1000 pages. I want
to add header & footer dynamically on these pages .
Is there any way to include header & footer on these pages using .htaccess
file.
thanks in advance
ke
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
87 matches
Mail list logo