![]() |
Quick PHP question
Got a quick (stupid) question for any PHP gurus out there....
How can I tell php to go from something like this: /home/httpd/html/somedomain.com/public_html to something like this: http://www.somedomain.com Yes I'm new.... stop laughing........... STOP IT!! But seriously -- any help would be appreciated.... Thx in advance Buzz :thumbsup |
huh?
i dont understand. . . |
I have this path in PHP:
/home/httpd/html/somedomain.com/public_html and I want to display it on a page as this: http://www.somedomain.com (as a link) |
What do you mean?
Do you want it to forward? <?php header (location: $url_you_want_here "); exit; ?> |
Something like this?
$q="/home/httpd/html/somedomain.com/public_html"; $z=explode("/", $q); $t1=$z[0]; $t2=$z[1]; ... etc :) |
<?PHP
$path="/home/httpd/html/somedomain.com/public_html"; print( preg_replace( ".*", "http://www.somedomain.com", $path ) ); ?> |
thx :)
|
Quote:
|
All times are GMT -7. The time now is 01:14 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123