Re: [PHP] Path question.

2011-07-28 Thread Richard Quadling
On 28 July 2011 13:36, Nilesh Govindarajan wrote: > On 07/28/2011 05:43 PM, Paul Halliday wrote: >> I have a few scripts that use "../location/file" >> >> Is this interpreted differently on some systems? >> >> Thanks. >> > > I have no idea about it, but I generally use realpath() to avoid any > su

RE: [PHP] Path question.

2011-07-28 Thread Dajka Tamas
Yes, can be. There is a predefined variable DIRECTORY_SEPARATOR, which you can use: on index.php let's say define('DS',DIRECTORY_SEPARATOR'); define('MY_APP_ROOT',dirname(realpath(__FILE__))); define('LIB_DIR',MY_APP_ROOT.DS."..".DS."location".DS."file"); Cheers, Tamas -Original Me

Re: [PHP] Path question.

2011-07-28 Thread vikash . iitb
On 28 July 2011 18:06, Nilesh Govindarajan wrote: > On 07/28/2011 05:43 PM, Paul Halliday wrote: > > I have a few scripts that use "../location/file" > > > > Is this interpreted differently on some systems? > > > > Thanks. > > > Use __DIR__."../location/file" otherwise files using these script c

Re: [PHP] Path question.

2011-07-28 Thread Nilesh Govindarajan
On 07/28/2011 05:43 PM, Paul Halliday wrote: > I have a few scripts that use "../location/file" > > Is this interpreted differently on some systems? > > Thanks. > I have no idea about it, but I generally use realpath() to avoid any such problems. Windows may have, because it uses backward slash

Re: [PHP] Path question

2011-03-31 Thread tedd
At 9:18 PM -0400 3/28/11, Jack wrote: Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in /includes/include_file.php

Re: [PHP] Path question

2011-03-30 Thread Richard Quadling
On 29 March 2011 19:41, D. Dante Lorenso wrote: > On 3/28/11 8:18 PM, Jack wrote: >> >> Hello All, >> Is there a smarter way to do includes by setting up a path or something >> where I don't have to include /home/domain.com/includes/include_file.php >> Apparently my path is as shown above,  but I

Re: [PHP] Path question

2011-03-29 Thread D. Dante Lorenso
On 3/28/11 8:18 PM, Jack wrote: Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in /includes/include_file.php I wrote

Re: [PHP] Path question

2011-03-28 Thread Paul M Foster
On Mon, Mar 28, 2011 at 09:18:39PM -0400, Jack wrote: > Hello All, > > > > Is there a smarter way to do includes by setting up a path or something > where I don't have to include /home/domain.com/includes/include_file.php > > Apparently my path is as shown above, but I would prefer to just p

Re: [PHP] path in document root / absolute path

2009-05-20 Thread Stuart
2009/5/20 Felix Siglreithmaier : > is there a way to check if a path is within the document_root? Compare it to $_SERVER['DOCUMENT_ROOT']. > and is there a function to check if a path is absolute or not? http://php.net/realpath -Stuart -- http://stut.net/ -- PHP General Mailing List (http:/

Re: [PHP] Path of the class file of an object

2008-09-06 Thread Stut
On 6 Sep 2008, at 20:08, Ali Çevik wrote: I need a procedure or an implementation that gives path of the class file of an object which I pass as a parameter. Example; Assume I have a class file located at C:\htdocs\Foo.class.php In code after I include Foo.class.php; I'm looking an implem

Re: [PHP] path finder

2007-06-25 Thread Jim Lucas
elk dolk wrote: Hi all, When I test my photo album in my IIS testing server relative path in the following code works fine : echo " "; but when I upload it to the web server I don’t see my photos, my /home directory on the web server contains public_ftp and public_html where my

Re: [PHP] path finder

2007-06-23 Thread Tijnema
On 6/23/07, elk dolk <[EMAIL PROTECTED]> wrote: Hi all, When I test my photo album in my IIS testing server relative path in the following code works fine : echo " "; but when I upload it to the web server I don't see my photos, my /home directory on the web server contains public_f

Re: [PHP] path

2006-11-10 Thread Stut
Alain Roger wrote: How can i get the path in which a PHP file is running ? for example, user clicking on a link opened page "action.php" file. this php file is located as "C:\webserver\mywebsite\php\test\action.php" how can i get this path (C:\webserver\mywebsite\php\test\)? $dir = dirname(_

RE: [PHP] path

2006-11-10 Thread Brad Fuller
> -Original Message- > From: Alain Roger [mailto:[EMAIL PROTECTED] > Sent: Friday, November 10, 2006 1:48 PM > To: PHP General List > Subject: [PHP] path > > Hi, > > How can i get the path in which a PHP file is running ? > > for example, user clicking on a link opened page "action.php"

Re: [PHP] Path to ImageMagick??

2004-11-25 Thread Jon Hill
The two programmes you will probably use are called 'convert' and 'mogrify' Usually found in /usr/bin if you are running Linux. Cyril On Thursday 25 November 2004 13:35, Aaron Wolski wrote: > Hey all, > > How can I find out the path ImageMagick on my server the php is running > on? > > Need it

Re: [PHP] path info question. Was delimiter question?

2004-08-24 Thread Steve Buehler
Thank You. I didn't know where to start looking. Anyway, putting the following lines in an .htaccess file in the directory worked like a charm: AcceptPathInfo On Thanks to all who helped. Steve At 02:02 PM 8/24/2004, you wrote: > How can I make the following work on an apache 2.0.46/php 4.3.2

Re: [PHP] path to binary for php on linux

2004-04-08 Thread jdavis
gt; Sent: Wednesday, April 07, 2004 8:11 PM > Subject: Re: [PHP] path to binary for php on linux > > > > * Thus wrote Andy B ([EMAIL PROTECTED]): > > > anybody know what the exact path for the php binary on linux is? > > locate finds all files containing the search string

Re: [PHP] path to binary for php on linux

2004-04-07 Thread Andy B
it was installed with get and which php doesnt do anything just returns to the prompt with no output - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 07, 2004 8:11 PM Subject: Re: [PHP] path to binary for p

Re: [PHP] path to binary for php on linux

2004-04-07 Thread Curt Zirzow
* Thus wrote Andy B ([EMAIL PROTECTED]): > anybody know what the exact path for the php binary on linux is? Depends on how it was installed, a common place is: /usr/local/bin/php Or you can type: which php and it will tell you where it is. Curt -- "I used to think I was indecisive, but no

Re: [PHP] path problems

2004-01-28 Thread Scott Taylor
Stuart wrote: Scott Taylor wrote: $file_two = 'archive/newsletters/Dec03PostPress.pdf'; Try replacing this line with... $file_two = $_SERVER['DOCUMENT_ROOT'].'/archive/newsletters/Dec03PostPress.pdf'; As my first posts states, I've tried that. And no, that doesn't work either. And on

Re: [PHP] path problems

2004-01-28 Thread Stuart
Scott Taylor wrote: $file_two = 'archive/newsletters/Dec03PostPress.pdf'; Try replacing this line with... $file_two = $_SERVER['DOCUMENT_ROOT'].'/archive/newsletters/Dec03PostPress.pdf'; -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] path problems

2004-01-28 Thread Scott Taylor
Yes, the error I get is a pop-up box saying "This is not a valid %PDF file" Here is my code: $file_two = 'archive/newsletters/Dec03PostPress.pdf'; //now view the PDF file header("Content-Type: application/pdf"); header("Accept-Ranges: bytes"); header("Content-Length: ".filesi

Re: [PHP] path problems

2004-01-27 Thread - Edwin -
On Tue, 27 Jan 2004 20:22:46 -0500 Scott Taylor <[EMAIL PROTECTED]> wrote: > I understand all of the file size ones. What I really don't > understand is why neither of the following examples work: > > /* example 1 */ > /* where $_SERVER['DOCUMENT_ROOT'] = > /usr/local/psa/home/vhosts/domain.com/

Re: [PHP] path problems

2004-01-27 Thread Scott Taylor
I understand all of the file size ones. What I really don't understand is why neither of the following examples work: /* example 1 */ /* where $_SERVER['DOCUMENT_ROOT'] = /usr/local/psa/home/vhosts/domain.com/httpdocs */ $file = $_SERVER['DOCUMENT_ROOT'] . '/archive/newsletters/Dec03.pdf'; readf

Re: [PHP] path problems

2004-01-27 Thread Stuart
Scott Taylor wrote: I have the following file: http://domain.com/archive/newsletters/Dec03.pdf Lovely. For some reason this works: filesize('archive/newsletters/Dec03.pdf'); Relative path from the current directory. Is your script in the web root? but this does not: filesize('/archive/newslette

Re: [PHP] Re: php path statement appears on my webpages

2003-07-31 Thread John Manko
: [PHP] Re: php path statement appears on my webpages If you don't run PHP as an CGI but as an module, you don't even need this line. My guess is that you run PHP as a module, so delete the line to fix your problem. HTH, -- Ivo Fokkema PHP & MySQL programmer Leiden University

Re: [PHP] Re: php path statement appears on my webpages

2003-07-31 Thread CPT John W. Holmes
> Thanks, but if I leave off this line then I get an error when I try and > view my pages. What kind of error, exactly? You need to determine if you're running PHP as a module or CGI. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

RE: [PHP] Re: php path statement appears on my webpages

2003-07-31 Thread Gronquist, Jim M
Ivo, Thanks, but if I leave off this line then I get an error when I try and view my pages. Jim -Original Message- From: Ivo Fokkema [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 9:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: php path statement appears on my webpages If

[PHP] Re: php path statement appears on my webpages

2003-07-31 Thread Ivo Fokkema
If you don't run PHP as an CGI but as an module, you don't even need this line. My guess is that you run PHP as a module, so delete the line to fix your problem. HTH, -- Ivo Fokkema PHP & MySQL programmer Leiden University Medical Centre Netherlands "Jim M Gronquist" <[EMAIL PROTECTED]> wrote in

Re: [PHP] path to php

2001-08-26 Thread David Robley
ECTED]> > Sent: Thursday, August 23, 2001 12:48 PM > Subject: Re: [PHP] path to php > > > >Have you tried which php or locate php? > > > > what do you mean? > > > > no shell acces, that requires contacting them to get, which they > > don't > >

Re: [PHP] path to php

2001-08-26 Thread ReDucTor
they don't give shell access without contacting them, and they don't reply to emails - Original Message - From: "ReDucTor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 23, 2001 12:48 PM Subject: Re: [PHP] pat

Re: [PHP] path to php

2001-08-26 Thread ReDucTor
;ReDucTor" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 23, 2001 12:20 PM Subject: Re: [PHP] path to php > On Thu, 23 Aug 2001 11:05, ReDucTor wrote: > > does anyone know all the possible paths to php...because i can't seem > > to find i

Re: [PHP] path to php

2001-08-24 Thread Chris Hayes
look for HTTP_ENV_VARS["SCRIPT_FILENAME"] it may show up when you ask for it and for sure in the list the phpinfo() results in. Chris Van:"ReDucTor" <[EMAIL PROTECTED]> Aan:<[EMAIL PROTECTED]> Datum verz. Thu, 23 Aug 2001 11:35:00 +1000 Ond

Re: [PHP] path to php

2001-08-22 Thread David Robley
On Thu, 23 Aug 2001 11:05, ReDucTor wrote: > does anyone know all the possible paths to php...because i can't seem > to find it on my current host...i have tried using the following > > php /path/to/script.php > /usr/php /path/to/script.php > /usr/local/bin/php /path/to/script.php > /usr/bin/php /