Re: $path
| From: | Tom Rogers | Date: | Wed, 23 Apr 2003 12:18:49 +0000 |
| Subject: | Re: $path | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144999@lists.php.net to get a copy of this message | ||
Hi,
Wednesday, April 23, 2003, 10:10:46 PM, you wrote:
DN> dear all,
DN> hi! in my PHP script, i'm writing to an HTML file.
DN> $path contains the path name for the background image.
DN> when i echo the content of $path in the second line, i
DN> get the correct path name. but when i want to put
DN> it as background image, and write the following code,
DN> i do not get the required background in my HTML page.
DN> thanks,
DN> diksha.
DN> <?php
DN> echo" $path";
DN> $fn = "page0.html";
DN> $fp = fopen ($fn, "w");
DN> $string='<html>
DN> <head>
DN> <title>Address</title>
DN> </head>
DN> <body background=" <?php echo"$path" ?> ">
You need to use the '.' operator like this:
$string='<html>
<head>
<title>Address</title>
</head>
<body background="'.$path.'">';
--
regards,
Tom