Re: [PHP] php and apache path...

2002-07-03 Thread Nightshade

Analysis  Solutions wrote:

 On Tue, Jul 02, 2002 at 10:34:32PM +0200, Nightshade wrote:
 Analysis  Solutions wrote:
 
 Document root doensn't solve my problem...
 ... snip ...
 Any solution?
 
 Read and heed what I already said:
 
  Whenever you have a question like this, run phpinfo() and see what's
  there which produces the variable you're looking for.
 
 If that doesn't have what you're looking for, you need to craft your own
 solution.
 
 --Dan
 

Yea,I understood. But my question is: is right that my Document_root (shown 
in phpinfo) is /var/www/html/ and not /var/www/html/mysite? And if isn't 
right where I can change this?
tnx again

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-03 Thread Erik Price


On Wednesday, July 3, 2002, at 11:08  AM, Nightshade wrote:

 Yea,I understood. But my question is: is right that my Document_root 
 (shown
 in phpinfo) is /var/www/html/ and not /var/www/html/mysite? And if isn't
 right where I can change this?

I'm not sure -- is that the directory that you want to be your document 
root?  I doubt it from what you're saying but nobody else has any way of 
knowing.

If you want your document root to be /var/www/html/mysite and it is 
currently something else, you need to set your httpd.conf file 
differently.  Or perhaps a .htaccess file can be used.  (This is 
assuming you are using Apache.)

Go to www.apache.org and read the httpd documentation there for more 
information about setting up the document root in httpd.conf.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] php and apache path...

2002-07-02 Thread Nightshade

Hi there.That's my question...A file that is in the 4th level's subdir must 
read a file that's in the 1st level. but I wish avoid to use millions
of ../../../thefile.php
I hope have been clear...
is there a unix like ~/ , to access to root directory of my site, so open 
the file?
tnx in advance, jonny

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-02 Thread Analysis Solutions

On Tue, Jul 02, 2002 at 03:47:20PM +0200, Nightshade wrote:
 is there a unix like ~/ , to access to root directory of my site

Does $_SERVER['DOCUMENT_ROOT'] help?

Whenever you have a question like this, run phpinfo() and see what's there 
which produces the variable you're looking for.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-02 Thread Nightshade

Analysis  Solutions wrote:

 On Tue, Jul 02, 2002 at 03:47:20PM +0200, Nightshade wrote:
 is there a unix like ~/ , to access to root directory of my site
 
 Does $_SERVER['DOCUMENT_ROOT'] help?
 
 Whenever you have a question like this, run phpinfo() and see what's there
 which produces the variable you're looking for.
 
 --Dan
 

Do you advice me to use
$_SERVER['DOCUMENT_ROOT'] . remaining_path/
in all my files?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-02 Thread Analysis Solutions

On Tue, Jul 02, 2002 at 09:55:13PM +0200, Nightshade wrote:
 
 Do you advice me to use
 $_SERVER['DOCUMENT_ROOT'] . remaining_path/
 in all my files?

I use relative paths in most circumstances.  Makes things easier to move 
between my development machine and the actual web servers.

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-02 Thread Nightshade

Analysis  Solutions wrote:

 On Tue, Jul 02, 2002 at 03:47:20PM +0200, Nightshade wrote:
 is there a unix like ~/ , to access to root directory of my site
 
 Does $_SERVER['DOCUMENT_ROOT'] help?
 
 Whenever you have a question like this, run phpinfo() and see what's there
 which produces the variable you're looking for.
 
 --Dan
 
Sorry again...
Document root doensn't solve my problem...
the var contain /var/www/html instead of /var/www/html/mysite
maybe I should set something up?
Any solution?
tnx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-02 Thread Analysis Solutions

On Tue, Jul 02, 2002 at 10:34:32PM +0200, Nightshade wrote:
 Analysis  Solutions wrote:
 
 Document root doensn't solve my problem...
 ... snip ...
 Any solution?

Read and heed what I already said:

  Whenever you have a question like this, run phpinfo() and see what's there
  which produces the variable you're looking for.

If that doesn't have what you're looking for, you need to craft your own 
solution.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php and apache path...

2002-07-02 Thread Justin French

In your config file (or at the top of each page) you should establish what
your document root is:

$docroot = /usr/home/sitename/;# or whatever

Then do something like include({$docroot}inc_dir/file.inc);


Or maybe you specify an include directory in your config:

$incdir = /usr/home/sitename/inc/;# or whatever

Then do something like include({$incdir}file.inc);


Or maybe write a small function that allows you to do it all
transparently... maybe something like myinclude('file.inc').


As Dan has pointed out, the other option would be to use
$_SERVER['DOCUMENT_ROOT']:

$docroot = $_SERVER['DOCUMENT_ROOT'];

include({$docroot}myfile.inc);


I don't believe it can be done with ~/ or ./ or something... haven't found
it yet!!


Justin French





on 03/07/02 1:34 AM, Analysis  Solutions ([EMAIL PROTECTED])
wrote:

 On Tue, Jul 02, 2002 at 03:47:20PM +0200, Nightshade wrote:
 is there a unix like ~/ , to access to root directory of my site
 
 Does $_SERVER['DOCUMENT_ROOT'] help?
 
 Whenever you have a question like this, run phpinfo() and see what's there
 which produces the variable you're looking for.
 
 --Dan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php