![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Sep 2002
Location: right next door... to YOU!
Posts: 214
|
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 ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Dec 2002
Location: Austin, TX
Posts: 2,115
|
huh?
i dont understand. . .
__________________
1monkey0cup.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Sep 2002
Location: right next door... to YOU!
Posts: 214
|
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) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Join Date: Sep 2002
Location: California
Posts: 2,021
|
What do you mean?
Do you want it to forward? <?php header (location: $url_you_want_here "); exit; ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Sep 2002
Location: http://www.nightstation.com
Posts: 1,375
|
Something like this?
$q="/home/httpd/html/somedomain.com/public_html"; $z=explode("/", $q); $t1=$z[0]; $t2=$z[1]; ... etc ![]()
__________________
http://www.nightstation.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
|
<?PHP
$path="/home/httpd/html/somedomain.com/public_html"; print( preg_replace( ".*", "http://www.somedomain.com", $path ) ); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Sep 2002
Location: right next door... to YOU!
Posts: 214
|
thx
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |