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 slashes

Re: [PHP] Path question.

2011-07-28 Thread vikash . iitb
On 28 July 2011 18:06, Nilesh Govindarajan cont...@nileshgr.com 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

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.DSDS.location.DS.file); Cheers, Tamas -Original

Re: [PHP] Path question.

2011-07-28 Thread Richard Quadling
On 28 July 2011 13:36, Nilesh Govindarajan cont...@nileshgr.com 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

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

Re: [PHP] Path question

2011-03-30 Thread Richard Quadling
On 29 March 2011 19:41, D. Dante Lorenso da...@lorenso.com 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,  

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

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 put in