Jump to content


Photo

PHP include, set the size


  • Please log in to reply
7 replies to this topic

#1 member

member
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 21 September 2006 - 08:46 PM

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

#2 member

member
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 21 September 2006 - 09:17 PM

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

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



#3 Demonic

Demonic
  • Members
  • PipPipPip
  • Advanced Member
  • 562 posts

Posted 21 September 2006 - 09:21 PM

Can you clear that question up? Because I have no clue on what you mean.  ???

#4 member

member
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 21 September 2006 - 09:25 PM

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.freeh...id=12&Itemid=27'); ?>
---------------------------------------------------

i want to specify it's dimensions.

does anyone have a clue?

Can you clear that question up? Because I have no clue on what you mean.  ???



#5 member

member
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 24 September 2006 - 06:43 PM

anyone?

#6 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 24 September 2006 - 06:46 PM

You would have to place it inside an iframe. Include just includes the code.

#7 member

member
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 24 September 2006 - 06:56 PM

r u sure?, i didn't want an iframe, as people would know my src, which then they could add it to theirs using the html iframe,

if not I'll have to change the source size

if anyone else know, let me know here. Thanks

#8 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 24 September 2006 - 08:18 PM

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.

<div style="border : solid 1px #fff; background : #fff; color : #000; padding : 0px; width:200px; height : 80px; overflow : auto; ">
<?php include("my_stuff.php"); ?>
</div>

Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users