Jump to content

PHP include, set the size


member

Recommended Posts

does anyone have a clue?, i'm sure it's very simple

[quote author=member link=topic=108971.msg438980#msg438980 date=1158871562]
Hi, just wanted to know what the code is to a php include, which i could set a specified width and height.

Thanks, ur help is most appreciated
[/quote]
Link to comment
Share on other sites

Ok what i mean is, I have a php include, what i want to do is adjust the size of it as in height and width.
A php include is like an iframe in html.

a sample code could be:

---------------------------------------------------------------------
<?php print file_get_contents('http://hanmia8.freehostia.com/index.php?option=com_content&task=view&id=12&Itemid=27'); ?>
---------------------------------------------------

i want to specify it's dimensions.

does anyone have a clue?

[quote author=Demonic link=topic=108971.msg439000#msg439000 date=1158873702]
Can you clear that question up? Because I have no clue on what you mean.  ???
[/quote]
Link to comment
Share on other sites

An include is nothing like an iframe at all.

Use an iframe definition to produce the size and other properties of the iframe into which you can place whatever source you want. Set the source atrribute to whatever file you want.

Since a php include is parsed on the server and sent as generated html, nobody will be able to see your source code, however it got to the page. All they'll see is the html generated by your php file.

Although I don't see what this has to do with iframes at all. Better to define a scrollable div and include your content therein.

[code]<div style="border : solid 1px #fff; background : #fff; color : #000; padding : 0px; width:200px; height : 80px; overflow : auto; ">
<?php include("my_stuff.php"); ?>
</div>[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.