home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

PHP $_SERVER help

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2115
Discussions: 200,948, Posts: 2,379,394, Members: 246,309
Old January 26th, 2006, 11:24 AM   Digg it!   #1 (permalink)
Senior Member
 
bwcc's Avatar
 
Join Date: Nov 2001
Location: Central KS
Posts: 840
PHP $_SERVER help

Im having a lapse in my recollection in using the $_SERVER predefined variables.

I have a reference to http://host/folder1/folder2/folder3/file1 in html.
The file that contains this reference may move from server to server. Instead of having to change that reference when I move the file, I would use:

PHP Code:
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; 
However, I want to drop the filename given in PHP_SELF, but keep the rest of the path.

Ideas?
__________________
Im against picketing, but I dont know how to show it.

Last edited by bwcc : January 26th, 2006 at 11:44 AM.
bwcc is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
php coding assistance with templete.php herbal_lavender Webmastering and Programming 2 December 29th, 2005 09:35 AM
index.php?mode=something.php RyanD Webmastering and Programming 16 October 20th, 2004 11:20 PM
More PHP Help Rand Dusing Webmastering and Programming 3 September 6th, 2004 11:51 AM
php help BlueIce Webmastering and Programming 0 August 28th, 2004 05:45 PM
PHP - Help? Blazer06 Webmastering and Programming 8 September 5th, 2003 01:29 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Making Health Care Worse (171)
The disrespect of Obama by Russian .. (22)
Is It Just Me? (2935)
Wireless Televisions. (11)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (6)
Is the PSU I received dead? (12)
radeon x850xt platinum & shader.. (5)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
Wireless Televisions. (12)
Graphics Card Upgrade Question (3)
How to convert MP3's (3)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
radeon x850xt platinum & shader 3 (5)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
Multiple Restarts Required at Boot (0)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Partition Magic caused HDD problem (3)


All times are GMT -4. The time now is 08:41 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28