You could do it this way:
Put the content of the file into a variable:
<?php
$fp = fopen("$filename", "r");
$content = "<!-- Insert Start -->";
if($fp) {
while(! feof($fp)) {
$content .= fread($fp, 1024);
}
}
?>
Insert the variable into a div tag:
<div id="content">
<?php
echo $content;
?>
</div>
Then create a style sheet that defines the properties of the content
DIV:
<style type="text/css">
<!--
#content {
height: 100px;
width: 100px;
float: left
}
-->
</style>
The above collection of code would include the contents of the specified
file/url into a box to the left of the screen, with any other text
wrapping around it. You could do pretty much what you want with the DIV
though, CSS Rocks :)
Does that answer the question?
Cheers,
Jason
> -----Original Message-----
> From: Nicole [mailto:[EMAIL PROTECTED]
> Sent: 23 February 2004 18:26
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP Alternative to IFRAME?
>
> Your right I was mixing up what I wanted.
>
> What I wanted to know I guess was if I use an include and
> include a file can I format where that file will display.
>
> So what I have is a little box with some info in it. I want
> it to display to the right of the body text and have the body
> text wrap around it.
>
> Nicole
>
> "Richard Davey" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello Nicole,
> >
> > Monday, February 23, 2004, 5:21:11 PM, you wrote:
> >
> > N> Is there a PHP alternative to an IFRAME? Here's what I mean.
> >
> > No, of course not. PHP is a server-side language. IFRAME's (and
> > anything related to page construction/display) is client-side.
> >
> > N> Is there a way to include a file in my php document that will be
> positioned
> > N> where I want it, like an IFRAME? I want to have it aligned right
> > N> with
> text
> > N> wrapping around it and I know IFRAME is not compatible with
> > N> Netscape browsers.
> >
> > You're mixing technologies. If Netscape won't display
> something, there
> > is nothing PHP can do about it. You need to think of another layout
> > technique that it can display.
> >
> > --
> > Best regards,
> > Richard Davey
> > http://www.phpcommunity.org/wiki/296.html
>
> --
> PHP General Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php