file which tries to find itself and can't...
- From: "julian_m" <julianmaisano@xxxxxxxxx>
- Date: 28 Feb 2006 12:17:33 -0800
<?
//file test.php
phpinfo();
$filename = "test.php"; //it does not work
$filename =
$_SERVER['DOCUMENT_ROOT']."/home/ke000067/public_html/test.php"; //it
does not work
$filename =
$_SERVER['DOCUMENT_ROOT']."/~ke000067/public_html/test.php"; //it
does not work
$filename = "home/ke000067/public_html/test.php"; //it does not
work
echo 'fila buscada: '.$filename.'<br>';
if (file_exists($filename)) {
echo 'Of course it is.<br>';
}else{
echo 'What?? How can it be???.<br>';
}
?>
these are some values retieved from phpinfo
_ENV["REMOTE_PORT"] 2010
_ENV["SCRIPT_FILENAME"] /home/ke000067/public_html/test.php
_ENV["SCRIPT_URI"] http://200.50.110.233/~ke000067/test.php
_ENV["SCRIPT_URL"] /~ke000067/test.php
_ENV["SERVER_ADDR"] 200.50.110.233
_ENV["SERVER_NAME"] 200.50.110.233
_ENV["SERVER_PORT"] 80
_ENV["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.33 Server at
200.58.112.233 Port 80</ADDRESS>
_ENV["SERVER_SOFTWARE"] Apache/1.3.33 (Unix) mod_auth_passthrough/1.8
mod_bwlimited/1.4 mod_log_bytes/1.2 mod_ssl/2.8.22 OpenSSL/0.9.7e
FrontPage/5.0.2.2635
_ENV["GATEWAY_INTERFACE"] CGI/1.1
_ENV["SERVER_PROTOCOL"] HTTP/1.1
_ENV["REQUEST_METHOD"] GET
_ENV["REQUEST_URI"] /~ke000067/test.php
_ENV["SCRIPT_NAME"] /~ke000067/test.php
_ENV["PATH_TRANSLATED"] /home/ke000067/public_html/test.php
I'm really confused about paths. Now I think that it is not a good idea
to learn on local server, beacause whenever one changes to a shared
one, all seems to fail....
Any hints?
sdos - jm
.
- Follow-Ups:
- Re: file which tries to find itself and can't...
- From: Csaba Gabor
- Re: file which tries to find itself and can't...
- Prev by Date: Re: help starting w/ user, group mgmt and mvc's
- Next by Date: Re: empty variable if/then
- Previous by thread: help starting w/ user, group mgmt and mvc's
- Next by thread: Re: file which tries to find itself and can't...
- Index(es):
Relevant Pages
|