GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Quick PHP question (https://gfy.com/showthread.php?t=122185)

Buzz_11 04-03-2003 02:22 PM

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

kevinale 04-03-2003 02:24 PM

huh?

i dont understand. . .

Buzz_11 04-03-2003 02:26 PM

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)

inthestars 04-03-2003 02:27 PM

What do you mean?

Do you want it to forward?

<?php

header (location: $url_you_want_here ");

exit;

?>

whee 04-03-2003 02:28 PM

Something like this?

$q="/home/httpd/html/somedomain.com/public_html";
$z=explode("/", $q);
$t1=$z[0]; $t2=$z[1]; ... etc

:)

vending_machine 04-03-2003 02:29 PM

&lt;?PHP

$path="/home/httpd/html/somedomain.com/public_html";
print( preg_replace( ".*", "http://www.somedomain.com", $path ) );

?&gt;

Buzz_11 04-03-2003 02:36 PM

thx :)

vending_machine 04-03-2003 02:39 PM

Quote:

Originally posted by Buzz_11
thx :)
I don't think anyone understood what you really wanted, so I don't think a thanks is in place. :)


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