how can I know the path of file starting with "http://d
Posted: Wed May 30, 2007 1:50 am
I have a file in server.
It's location is:
/home/myonbiz/public_html/domainname/path1/path2/.../done.txt
how can I know the path of file starting with "http://domainname/path/done.txt" using php function.
when I try to print it using command
<?php
$path="path/path/done.txt";
$dir = $_SERVER['DOCUMENT_ROOT'].$path;
echo $dir;
?>
it gives
/home/myonbiz/public_html/domainname/path1/path2/.../done.txt
but I needed only http://domainname/path/done.txt
It's location is:
/home/myonbiz/public_html/domainname/path1/path2/.../done.txt
how can I know the path of file starting with "http://domainname/path/done.txt" using php function.
when I try to print it using command
<?php
$path="path/path/done.txt";
$dir = $_SERVER['DOCUMENT_ROOT'].$path;
echo $dir;
?>
it gives
/home/myonbiz/public_html/domainname/path1/path2/.../done.txt
but I needed only http://domainname/path/done.txt