473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

variable interpolation syntax (SERVER_SIGNATURE)

I have a tiny custom 404 script I'm working on; I'd like to imitate the
standard Apache 404 page insofar as I'd like "Apache/1.3.29 Server at
www.example.com Port 80" to appear below my 404 message.

The problem is that when I try to interpolate
$_SERVER['SERVER_SIGNATURE'] into the html output of my script it
produces a link of the following (incorrect) format:

http://www.example.com/\"mailto:we*******@example.com\"

I've tried placing the contents of SERVER_SIGNATURE into a variable in
the php code in my page:

$VAR = $_SERVER['SERVER_SIGNATURE'];

....and tried direct interpolation in the html output:

echo "$_SERVER['SERVER_SIGNATURE']";

Can I get a clue here?

Thanks.

Jul 17 '05 #1
1 4426
Peter Horst wrote:
I have a tiny custom 404 script I'm working on; I'd like to imitate the
standard Apache 404 page insofar as I'd like "Apache/1.3.29 Server at
www.example.com Port 80" to appear below my 404 message.

The problem is that when I try to interpolate
$_SERVER['SERVER_SIGNATURE'] into the html output of my script it
produces a link of the following (incorrect) format:

http://www.example.com/\"mailto:we*******@example.com\"

I've tried placing the contents of SERVER_SIGNATURE into a variable in
the php code in my page:

$VAR = $_SERVER['SERVER_SIGNATURE'];

...and tried direct interpolation in the html output:

echo "$_SERVER['SERVER_SIGNATURE']";


Didn't figure out why it was happening, but I worked around it by
eliminating the '\' character in the output string:

$VAR = str_replace("\\", "", $_SERVER['SERVER_SIGNATURE']);

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: red | last post by:
within an object function, this code: $test2='test'; echo "$test"; $this->test2='test2'; echo "$this->test2\n"; produces this result: test2
7
by: bartek | last post by:
Hello, I've been pondering with this for quite some time now, and finally decided to ask here for suggestions. I'm kind of confused, actually... Maybe I'm thinking too much... Brain dump...
14
by: Charles Banas | last post by:
I'm not sure if this is the right place to ask about this, but I've seen several posts in the past regarding Akima's Bivariate Interpolations routines, and i'm wondering if someone can give me some...
3
by: Jonas Ernst | last post by:
Hi, Can somebody give me some hints how to do a line interpolation without using floating point arithemtics? The function shall do a linear interpolation between 2 points (line interp?) and...
4
by: Jason Dunbar | last post by:
Hi there.. I am wondering if it is possible to interpolate the value of a variable to reference a variable to gain its value. For example:- if I have a series of variables:- var01
8
by: Jerry | last post by:
I am a MySQL and PHP newbie. I am having trouble getting the $w variable in my code below passed to mysql. When I use the value of $w directly in the Where clause, the correct rows are returned....
10
by: John Passaniti | last post by:
(Note: This is not the same message I posted a week or so ago. The problem that prevented my previous attempt to work was a silly error in the template system I was using. This is a problem...
5
by: CarpeSkium | last post by:
I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. I am using yesterday's date to find all of my data from yesterday....
5
by: August Karlstrom | last post by:
Hi, Does anyone know the correct syntax to interpolate a class variable, $x say, inside a string? I tried "{self::$x}" but it produces the string {self::x}
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.