Re: [PHP] Include???

2007-05-23 Thread Jim Lucas
Daniel Brown wrote: On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > Okay, I think I'm doing everything right, but for whatever reason my > include > isn't working. > > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { > include ('complete_save.php'); > } >

Re: [PHP] Include???

2007-05-23 Thread Daniel Brown
On 5/23/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: > Okay, I think I'm doing everything right, but for whatever reason my > include > isn't working. > > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { > include ('complete_save.php'); > } > ?> > > The echo of my

Re: [PHP] Include???

2007-05-23 Thread Jim Lucas
Dan Shirah wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. The echo of my status_code retruns the correct value so the if should trigger. This is my include page: VERY simple, but for some reason is not working I think to this point

Re: [PHP] Include???

2007-05-23 Thread Alister Bulman
On 23/05/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. if ($_POST['status_code'] = "C") { It's a pretty classic error, Not one that I make very often though - because I will generally write: if ('C' = $_POS

Re: [PHP] Include???

2007-05-23 Thread Richard Davey
Hi Dan, Wednesday, May 23, 2007, 3:24:11 PM, you wrote: > Okay, I think I'm doing everything right, but for whatever reason my include > isn't working. > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { > include ('complete_save.php'); > } ?>> > The echo of my status_code re

Re: [PHP] Include???

2007-05-23 Thread Daniel Brown
On 5/23/07, Greg Donald <[EMAIL PROTECTED]> wrote: On 5/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > Okay, I think I'm doing everything right, but for whatever reason my include > isn't working. > > echo $_POST['status_code']; > if ($_POST['status_code'] = "C") { == not = -- Greg Donald ht

Re: [PHP] Include???

2007-05-23 Thread Greg Donald
On 5/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I think I'm doing everything right, but for whatever reason my include isn't working. == not = -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Include???

2007-05-23 Thread Dan Shirah
Okay, I think I'm doing everything right, but for whatever reason my include isn't working. The echo of my status_code retruns the correct value so the if should trigger. This is my include page: VERY simple, but for some reason is not working

Re: [PHP] Include files....

2007-05-21 Thread Richard Lynch
An include jumps back into HTML "mode" so you need: 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: > > include 'defaults.php'; > > $link = mysql_connect($server, $usern

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: > > > > > > >> > > > >>

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 obv

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 th

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 > > wit

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 Tijnema Well there it is... The Brain fart... Or misunderstanding... I thought s

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: '; mysql_select_db($database) or die('Could not select database: ' . mysql_error()); echo 'DB selected '; $result = mysql_query(

[PHP] Include files....

2007-05-18 Thread Jason Pruim
Okay, Very Newbie-ish question coming! I can't figure out why my include won't work... Here's the text: index.php: $link = mysql_connect($server, $username, $password) or die('Could not connect: ' . mysql_error()); echo 'Connected successfully '; mysql_select_db($database) or die('Could not s

Re: [PHP] Include file path.. please help im newby

2007-02-28 Thread Jochem Maas
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

RE: [PHP] Include file path.. please help im newby

2007-02-24 Thread Peter Lauri
- 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.

[PHP] Include file path.. please help im newby

2007-02-24 Thread StainOnRug
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

Re: [PHP] include file identifier

2007-02-05 Thread Richard Lynch
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

Re: [PHP] include file identifier

2007-02-05 Thread Craige Leeder
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

Re: [PHP] include file identifier

2007-02-05 Thread Eli
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.

Re: [PHP] include file identifier

2007-02-04 Thread Richard Lynch
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

Re: [PHP] include file identifier

2007-02-03 Thread Robert Cummings
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

Re: [PHP] include file identifier

2007-02-03 Thread Larry Garfield
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?

Re: [PHP] include file identifier

2007-02-03 Thread Eli
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

Re: [PHP] include file identifier

2007-02-03 Thread Robert Cummings
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

[PHP] include file identifier

2007-02-03 Thread Eli
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

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 "C:\direc

[PHP] Include files beneath pointed directory

2007-01-18 Thread Wikus Moller
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 "C:\directory\anotherdirectory

Re: [PHP] Include file error, common one I think

2007-01-13 Thread Chris Carter
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

Re: [PHP] Include file error, common one I think

2007-01-13 Thread tedd
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

Re: [PHP] Include file error, common one I think

2007-01-13 Thread Jochem Maas
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

Re: [PHP] Include file error, common one I think

2007-01-13 Thread Chris Carter
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

Re: [PHP] Include problem

2006-12-09 Thread Richard Lynch
There is also a set_include_path function, I do believe. On Wed, December 6, 2006 4:26 am, Ashley Hales wrote: > I am trying to use includes on a free php server but I cannot set the > includes_path myself. Consequently when I try to include common > elements or > library files I run into trouble

Re: [PHP] Include problem

2006-12-06 Thread Dave Goodchild
Use ini_set or an .htaccess file - try the first, and if that doesn't work use an .htaccess file if you have them enabled in the server (and it's Apache of course!). On 12/6/06, Ashley Hales <[EMAIL PROTECTED]> wrote: I am trying to use includes on a free php server but I cannot set the include

[PHP] Include problem

2006-12-06 Thread Ashley Hales
I am trying to use includes on a free php server but I cannot set the includes_path myself. Consequently when I try to include common elements or library files I run into trouble as I am unable to store or gain acesss to a central includes folder for the entire of my website to access. Is ther

Re: [PHP] Include and require

2006-08-14 Thread Richard Lynch
On Mon, August 14, 2006 4:20 pm, Dave Goodchild wrote: > Hi all - I have several require_once statements in my web app to load > in > small function libraries. A common one bundles a variety of functions > to > handle date math and map month numbers to month names. I originally > defined > an array

[PHP] Include and require

2006-08-14 Thread Dave Goodchild
Hi all - I have several require_once statements in my web app to load in small function libraries. A common one bundles a variety of functions to handle date math and map month numbers to month names. I originally defined an array in that file plus a bunch of functions but when I loaded the page,

Re: [PHP] include defer from cli to apache

2006-08-03 Thread Richard Lynch
On Fri, July 28, 2006 7:25 pm, Martin Marques wrote: > I' trying to include files from a script which will be executed from > CLI via cron. > > Now, if I execute the script from the command line it works OK, but > when it's executed via cron I fails to include a file, which is being > included via

[PHP] include defer from cli to apache

2006-07-28 Thread Martin Marques
I' trying to include files from a script which will be executed from CLI via cron. Now, if I execute the script from the command line it works OK, but when it's executed via cron I fails to include a file, which is being included via and include from the script. It looks like when including a

Re: [PHP] include() question

2006-05-09 Thread Richard Lynch
On Mon, May 8, 2006 1:42 pm, PHP wrote: > Normally I would, except that file does a lot of work, and it was too > much > to have on the same server. That is why I was including it remotely. Unless the remote server is HUMUNGOUS compared to the original server, or it just has nothing else to do but

Re: [PHP] include() question

2006-05-08 Thread Wolf
Sounds like a good reason to lobby for new hardware!! :) Also sounds like why it might be timing out for you as well. Depending on how "core" that file is to your business and online presence (and they both matter equally), you might want to look at investing in new hardware for the server(s) so

Re: [PHP] include() question

2006-05-08 Thread PHP
ent: Monday, May 08, 2006 11:21 AM Subject: Re: [PHP] include() question Bad programmer! No Donut! Just out of curiosity, why not just rsync the file over or copy it straight to the server you are running? That way you don't have to worry about it going missing. No telling when a server HD

Re: [PHP] include() question

2006-05-08 Thread Wolf
Bad programmer! No Donut! Just out of curiosity, why not just rsync the file over or copy it straight to the server you are running? That way you don't have to worry about it going missing. No telling when a server HD might go t*ts up and you'll be left holding the bag(s). Wolf PHP wrote: > Hi

Re: [PHP] include() question

2006-05-08 Thread PHP
Hey, what do you know, readfile() times out too. - Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]>; "php" Sent: Monday, May 08, 2006 11:05 AM Subject: RE: [PHP] include() question [snip] I am incl

Re: [PHP] include() question

2006-05-08 Thread PHP
Yeah... The page does produce valid code. However, the manual didn't say anything about timing out. - Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]>; "php" Sent: Monday, May 08, 2006

Re: [PHP] include() question

2006-05-08 Thread Richard Lynch
On Mon, May 8, 2006 12:55 pm, PHP wrote: > I am including a page from another server: (include("http://";)); > > Works fine, but if for some reason that server is not responding, the > page that is calling it also never returns, so the user ends up with a > time out. > > Is there something I ca

RE: [PHP] include() question

2006-05-08 Thread Jay Blanchard
[snip] I am including a page from another server: (include("http://";));   Works fine, but if for some reason that server is not responding, the page that is calling it also never returns, so the user ends up with a time out.   Is there something I can set that will not force the calling serve

[PHP] include() question

2006-05-08 Thread PHP
Hi, I am including a page from another server: (include("http://"));   Works fine, but if for some reason that server is not responding, the page that is calling it also never returns, so the user ends up with a time out.   Is there something I can set that will not force the calling se

Re: [PHP] include problem

2006-05-04 Thread Richard Lynch
On Thu, May 4, 2006 1:46 pm, Jef Sullivan wrote: > I have set a variable and building a string that will be used later in > my php file. > > The string is a table. Within this table I want to call another php > file > using include for a > > pulldown menu. The problem is the included file is not sh

[PHP] include problem

2006-05-04 Thread Jef Sullivan
Greetings everyone, Thanks for the help in advance. PHP version is 4.3 I have set a variable and building a string that will be used later in my php file. The string is a table. Within this table I want to call another php file using include for a pulldown menu. The problem is the includ

Fwd: [PHP] Include Problem

2006-04-16 Thread Martin Alterisio
Ups, I forgot to reply to everyone again, sorry. -- Forwarded message -- From: Martin Alterisio <[EMAIL PROTECTED]> Date: 16-abr-2006 13:53 Subject: Re: [PHP] Include Problem To: Shaun <[EMAIL PROTECTED]> You're using an absolute path to the file, maybe what yo

Re: [PHP] Include Problem

2006-04-15 Thread tedd
At 8:03 PM +0100 4/15/06, Shaun wrote: Hi, I am having problems with an include statement, i am using the following statement in an effort to include a footer file on my page: include("/cms/templates/footer.php"); However I get the following error: Warning: main(/cms/templates/footer.php): fa

Re: [PHP] Include Problem

2006-04-15 Thread Shaun
> > maybe? > > Dan > > --- > http://chrome.me.uk > > > -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED] > Sent: 15 April 2006 20:05 > To: php-general@lists.php.net > Subject: [PHP] Include Problem > > Hi, > > I am havi

Re: [PHP] Include Problem

2006-04-15 Thread Shaun
"Mark Charette" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Shaun wrote: >> Warning: main(/cms/templates/footer.php): failed to open stream: No such >> file or directory in /home/m/y/mysite/public_html/cms/news/index.php on >> line >> 38 >> > Most assuredly the file isn't there

Re: [PHP] Include Problem

2006-04-15 Thread Mark Charette
Shaun wrote: Warning: main(/cms/templates/footer.php): failed to open stream: No such file or directory in /home/m/y/mysite/public_html/cms/news/index.php on line 38 Most assuredly the file isn't there (do you have the include path set?) or the permissions are not sufficient to open the file.

RE: [PHP] Include Problem

2006-04-15 Thread Chrome
Try include($_SERVER['DOCUMENT_ROOT'] . "/cms/templates/footer.php"); maybe? Dan --- http://chrome.me.uk -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: 15 April 2006 20:05 To: php-general@lists.php.net Subject: [PHP] Includ

[PHP] Include Problem

2006-04-15 Thread Shaun
Hi, I am having problems with an include statement, i am using the following statement in an effort to include a footer file on my page: include("/cms/templates/footer.php"); However I get the following error: Warning: main(/cms/templates/footer.php): failed to open stream: No such file or dire

[PHP] Include Problem

2006-04-15 Thread Shaun
Hi, I am having problems with an include statement, i am using the following statement in an effort to include a footer file on my page: include("/cms/templates/footer.php"); However I get the following error: Warning: main(/cms/templates/footer.php): failed to open stream: No such file or di

Re: [PHP] include file path errors

2006-04-08 Thread tedd
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

Re: [PHP] include path file errors

2006-04-08 Thread kmh496
2006-04-08 (토), 12:18 -0400, John Hicks 쓰시길: > kmh496 wrote: > > 2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: > > > >>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"); > >

Re: [PHP] include path file errors

2006-04-08 Thread John Hicks
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"); common.php has a line which says require_once ($_SERVER[document_root]."/_common.php"); // main include file for whole site it send

Re: [PHP] include path file errors

2006-04-08 Thread John Hicks
kmh496 wrote: > 2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: > >>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"); >> >>common.php has a line which says >> >>require_once ($_SERVER[document

Re: [PHP] include path file errors

2006-04-08 Thread kmh496
2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: > 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"); > > common.php has a line which says > > require_once ($_SERVER[document_root]."/_common.ph

Re: [PHP] include not working properly?

2006-03-09 Thread Jochem Maas
robert mena wrote: Hi, Thanks. it worked. Since I have a common server where various virtualhosts reside what would you recommend in terms of security? 1. don't let assholes on your box. 2. read http://phpsec.org safemode and openbase_dir are primarily designed to protected legitimate users

Re: [PHP] include not working properly?

2006-03-07 Thread Chris
robert mena wrote: Hi, I am facing a strange problem. One of my classes uses a include("Log.php") to enable to to use the Log class that comes with pear. *Fatal error*: require_once() [function.require]: Failed opening required 'Log.php' (includ

[PHP] include not working properly?

2006-03-07 Thread robert mena
Hi, I am facing a strange problem. One of my classes uses a include("Log.php") to enable to to use the Log class that comes with pear. *Fatal error*: require_once() [function.require]: Failed opening required 'Log.php' (include_path='.:/usr/local/

Re: [PHP] Include after image or a way to reset header

2006-02-03 Thread Richard Lynch
On Fri, February 3, 2006 10:15 am, tedd wrote: > This is probably an obvious question, but after you create an image, > how can you include another php script? Your image is a single, atomic, non-divisible, non-extensible, object. You should have one URL for the image: http://example.com/buildim

Re: [PHP] Include after image or a way to reset header

2006-02-03 Thread Gerry Danen
Call the image rendering from another page and then let that page continue: caller.php: if ( $is_logged_in ) { echo ""; if ( $get_name != "" ) echo "$get_name"; } showimage.php: Gerry On 2/3/06, tedd <[EMAIL PROTECTED]> wrote: > Hi: > > This is probably an obvious question, but after you crea

[PHP] Include after image or a way to reset header

2006-02-03 Thread tedd
Hi: This is probably an obvious question, but after you create an image, how can you include another php script? For example, if my code ends like so: header("Content-type: image/png"); // Set display mode as PNG imagepng($im); // Display image imagedestroy($im); // Delete image from memory

Re: [PHP] include() problem

2006-01-09 Thread Gerry Danen
Here's a snippet of what's at the start of most of my php files: $pagetitle = "Lily Articles"; $pagefname = __FILE__; // for later logging $pagedocroot = $_SERVER['DOCUMENT_ROOT']; require_once ("$pagedocroot/include_db/db_connect.php"); require_once ("$pagedocroot/include/funcs.php"); Hope th

RE: [PHP] include() problem

2006-01-09 Thread Dan Parry
Check this out http://uk2.php.net/reserved.variables DOCUMENT_ROOT will give you the root of your site -Original Message- From: Nuno Trancoso [mailto:[EMAIL PROTECTED] Sent: 09 January 2006 14:56 To: php-general@lists.php.net Subject: [PHP] include() problem This may sound dumb, but i

Re: [PHP] include() problem

2006-01-09 Thread David Grant
Nuno, Have you considered $_SERVER['DOCUMENT_ROOT']? David Nuno Trancoso wrote: > This may sound dumb, but i have been up all night going through > php/apache docs, and still have not found an answer.. > > Throughout a site i need to include files that are scattered in subdirs, > sometimes up i

[PHP] include() problem

2006-01-09 Thread Nuno Trancoso
This may sound dumb, but i have been up all night going through php/apache docs, and still have not found an answer.. Throughout a site i need to include files that are scattered in subdirs, sometimes up in the dir tree, sometimes down. Bad design i know but i have to live w/ it... Problem i

Re: [PHP] include/include_once php_check_syntax() / E_PARSE errors

2005-11-15 Thread Curt Zirzow
On Tue, Nov 15, 2005 at 10:48:56PM +, Thiago Silva wrote: > ... > So, __autload has to *try* include_once's. Something like that: > > function __autoload($className) { > include_once("${className}.php"); > if(class_exists($className, false)) return; > > include_once("${className}.class.php

[PHP] include/include_once php_check_syntax() / E_PARSE errors

2005-11-15 Thread Thiago Silva
Hello all, Recently I had some problems with include/include_once. This is the scenario: My application uses only classes loaded through a centered __autoload() function (no "require/include" anywere in the scripts, but in __autoload() itself). Now, diverse libraries use diverse extensions. For

Re: [PHP] include file to global scope

2005-10-12 Thread Jochem Maas
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

Re: [PHP] include file to global scope

2005-10-12 Thread Claudio
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

Re: [PHP] include file to global scope

2005-10-12 Thread Claudio
> 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

Re: [PHP] include file to global scope

2005-10-12 Thread Jochem Maas
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

[PHP] include file to global scope

2005-10-12 Thread Claudio
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?

[PHP] Include path quirks

2005-07-18 Thread Ethilien
I've been attempting to write an application with a bit more ordered directory structure than I normally use, and I ran into the rather annoying problem with include() where relative paths are only based off of the current working directory, and not that of the included script. This makes it im

[PHP] Include and extending classes

2005-06-16 Thread Mike Smith
I'm trying to consolidate code in a new project. My dirs are: / /inc core.class.php /mods /mods/system system.class.php //extends core.class.php user.class.php //extends system.class.php In core.class.php I have my generic special html methods and my db connection. I'm having trouble a

Re: [PHP] include()

2005-06-13 Thread Richard Davey
Hello, Monday, June 13, 2005, 5:02:40 PM, you wrote: IG> Is there a big difference between me including a file by putting IG> the url in the include() such as IG> include("http://www.examplesite.com/examplefile.php) and putting IG> the server path such as IG> include("number/www.examplesite.com/p

Re: [PHP] include()

2005-06-13 Thread Rasmus Lerdorf
() is meaningless in an include. But in PHP you can put () around just about anything you want. Just like you can do: $a = ($b); There is no point in the brackets there. The PHP parser simply uses brackets to create precedence groups. So yes, you can do include("foo.php") if you want, but you

[PHP] include()

2005-06-13 Thread I. Gray
Hi Just a quickie. Is there a big difference between me including a file by putting the url in the include() such as include("http://www.examplesite.com/examplefile.php) and putting the server path such as include("number/www.examplesite.com/public_html/examplefile.php") ? I want to get in

[PHP] Include (evaluate) PHP/HTML code stored in a variable

2005-06-08 Thread Marc Stoecklin
Hi all, I am trying to figure out how mixed HTML and PHP code (like one might have in a normal PHP file) can be evaluated if it is stored in a variable, e.g. obtained from a database query. Unfortunately, the ``eval'' function only accepts pure PHP code which (in addition) must not have any synta

Re: [PHP] include file and problems with headers

2005-05-27 Thread Brian V Bonini
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

Re: [PHP] Include Remote Content as REMOTE_ADDR of Browser

2005-05-27 Thread Ryan Grange
Gary C. New wrote: Is there a quick and dirty way to include, file, or fsockopen content from a remote server and make it appear as though the request was straight from the browser's remote address? Thank you for your assistance. Respectfully, Gary I believe you would in effect by spoofi

Re: [PHP] include file and problems with headers

2005-05-27 Thread Philip Hallstrom
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

[PHP] Include Remote Content as REMOTE_ADDR of Browser

2005-05-27 Thread Gary C. New
Is there a quick and dirty way to include, file, or fsockopen content from a remote server and make it appear as though the request was straight from the browser's remote address? Thank you for your assistance. Respectfully, Gary -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] include file and problems with headers

2005-05-26 Thread Ross
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

Re: [PHP] include remote class

2005-05-11 Thread Dan Rossi
im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? If you surf to that URL, do you see PHP source, or do you see HTML/nothing? You may want to use

RE: [PHP] include remote class

2005-05-11 Thread PHP
manual page that i tried using .inc but server did not parse it. a setting perhaps? -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 9:52 PM To: Andy Sandvik Cc: php-general@lists.php.net Subject: Re: [PHP] include remote class On Tue, May 10

Re: [PHP] include remote class

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 10:10 am, Andy Sandvik said: > > im doing include('http://www.mysite.com/class.php'); > and then i create new instance but i get error - cannot instantiate > non-existant class > how can i get this remotely hosted class file to be defined? If you surf to that URL, do you see P

Re: [PHP] include remote class

2005-05-10 Thread Greg Donald
On 5/10/05, Andy Sandvik <[EMAIL PROTECTED]> wrote: > im doing include('http://www.mysite.com/class.php'); > and then i create new instance but i get error - cannot instantiate > non-existant class > how can i get this remotely hosted class file to be defined? If it's a PHP file sitting on a web s

[PHP] include remote class

2005-05-10 Thread Andy Sandvik
im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] include with remoted address

2005-04-06 Thread Richard Lynch
On Wed, April 6, 2005 12:00 am, [EMAIL PROTECTED] said: > Hi to all, > I've wrote a program with a web-browser interface (IE) and > a built-in server (INDY) which call the php-cgi.exe CGI application > and redirect stdio/stdout/sterr to pass .php scripts readed from > a crypted and zipped sets of f

Re: [PHP] include with remoted address

2005-04-06 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: A this point to include a file in a my script I must use for each .PHP file: There is another way (i think to php.ini) to set default include, require_once, working area to my 'http://localhost:xxx/' avoid to manually insert upon code ? There is the include_dir directive i

<    1   2   3   4   5   6   7   8   9   10   >