use SERVER_ADDR in IFRAME

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
linsteina
Forum Newbie
Posts: 1
Joined: Tue Nov 15, 2011 10:18 pm

use SERVER_ADDR in IFRAME

Post by linsteina »

Hi team,

Is that possible to use $_SERVER['SERVER_ADDR'] in IFRAME src ?

my code in html:

<html>

<IFRAME src="http://<?php echo $_SERVER['SERVER_ADDR']; ?>:80/ip.html >
</IFRAME>

</html>

But it does not display ip.html but blank.

Any suggestions?

Thanks
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: use SERVER_ADDR in IFRAME

Post by social_experiment »

If you echo $_SERVER['SERVER_ADDR'] normally, sans iframe; what is displayed?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply