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
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
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
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
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
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
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
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
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:/
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
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
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
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(_
> -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"
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
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
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
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
* 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
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
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
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
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/
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
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
: [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
> 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
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
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
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
>
>
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
;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
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
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 /
34 matches
Mail list logo