Hi!

I noticed you've been repeatedly posing this message. The reason why nobody answers
is because your question is a little strange.

The answer is yes, you could have something like
[file whatever.php]
<div id="haiti" style="position:absolute; left:752px; top:321px;
  width:166px; height:162px; z-index:14; visibility: hidden">
<? // This is the PHP opening tag
include photos.php; // PHP code
// Ending PHP mode on next line
?>
</div>
[eof]

[file photos.php]
    <table width=166 border=0 cellpadding=0 cellspacing=0>
      <tr>
        <td> <img src="Atlas/images/photolayer_11.gif" width=81  height=55></td>
        <td> <img src="Atlas/images/photolayer_12.gif" width=85  height=55></td>
      </tr>
      <tr>
        <td> <img src="Atlas/images/photolayer_14.gif" width=81  height=53></td>
        <td> <img src="Atlas/images/photolayer_15.gif" width=85  height=53></td>
      </tr>
      <tr>
        <td> <img src="Atlas/haiti_17.gif" width=81 height=55></td>
        <td> <img src="Atlas/haiti_18.gif" width=85 height=55></td>
      </tr>
    </table>
[eof]

But would you need that? It's the same thing as having photos.php hard coded into
whatever.php unless you either
1. Use some actual PHP code (retrieve some data from a database, make some
decisions based on some data passed via HTTP, based on the date/time of day, I
don't know, whatever).
2. Include the same file in multiple other files (which would help you because
you'd only have to change one file when that's required - sort of dynamically
linking if you wish).

For more info on PHP you may check http://download.php.net/manual/en/langref.php
The best way to start is by actually installing PHP and writing some code - even if
you find out you don't need it for this particular project, it's definitely not a
waste of time.

Bogdan

tim at 10Kv wrote:

> Thanks for everyone's comments its given me a better idea of what php can
> do.
>
> I need a little clarification on what's been said then Ill unsubscribe and
> never come back ­ I just need to know if this is the kind of thing php can
> help me with.
>
> ... If I understand what you have told me so far it should be possible to
> fill the content of a layer by
> issuing some sort of Œserver include¹ command.. (?)  So, for example, rather
> than have a something
> that looks like this:
>
> <div id="haiti" style="position:absolute; left:752px; top:321px;
> width:166px; height:162px; z-index:14; visibility: hidden">
>   <table width=166 border=0 cellpadding=0 cellspacing=0>
>     <tr>
>       <td> <img src="Atlas/images/photolayer_11.gif" width=81
> height=55></td>
>       <td> <img src="Atlas/images/photolayer_12.gif" width=85
> height=55></td>
>     </tr>
>     <tr>
>       <td> <img src="Atlas/images/photolayer_14.gif" width=81
> height=53></td>
>       <td> <img src="Atlas/images/photolayer_15.gif" width=85
> height=53></td>
>     </tr>
>     <tr>
>       <td> <img src="Atlas/haiti_17.gif" width=81 height=55></td>
>       <td> <img src="Atlas/haiti_18.gif" width=85 height=55></td>
>     </tr>
>   </table>
> </div>
>
> It should be possible to have some code that gives the layer position but
> rather than then having all the other code describing the layer contents,
> have some sort of php command that says 'get the contents from file
> xxx.php'. If this is the case what should I be learning about to make this
> happen?
>
> Thanks again,
>
> Tim
>
> (standing on the shoulders of giants)
>
> -----------
>
> > Your question is not stupid - it's just uninformed, and that's easily
> > understandable if you never used PHP.
> >
> > The concept is dynamically creating the page SERVER-SIDE. That is, use some
> > databases or some nifty code to dynamically build a page using specific
> > parameters. Unforunately for you, this means that all the fun ends on the
> > server
> > side. Once PHP ends its job, Apache takes over and serves the content
> > generated
> > by PHP as it would serve any regular file. What you actually pass to the
> > client
> > is "dead" information - it's not dynamic unless you echo some JavaScript code
> > or
> > something similar from PHP (which is the same as writing the respective code
> > in
> > a regular file, unless you create some custom parameters in JavaScript based
> > on
> > some other parameters you pass to PHP).
> >
> > Hope my explanation makes sense... ;-)
> >
> > Bogdan
> >
> > tim at 10Kv wrote:
> >
> >> Hi,
> >>
> >> first of all apologise to the list ­ this is a very basic question for you
> >> I¹m sure. I have tried to find an answer on the web but the problem is
> >> knowing HOW to ask the question ­ and I hoping you can provide me with a
> >> starting point.
> >>
> >> Anyway.. I design a lot of graphic intensive pages which rely heavily on
> >> layers that contain images, mouseovers and image swaps. The trouble is, when
> >> there are more than a couple of these layers on a page the code gets long
> >> and over complicated.  For example, if I have a page which on one side
> >> contains an image map with 5 clickable points that shows one of 5 possible
> >> layers on the other side of the page  (each with different content)  this is
> >> automatically a page with lots of code which is slow to load ­ especially if
> >> the page already has a layer based navigation bar!
> >>
> >> My question is: is there a way to use a language like php to make this
> >> process easier? For example populate the layers from a different file rather
> >> than have all the code on the same page and perhaps slim the page down a
> >> little ­ or is this missing the point of what a language like php is about.
> >>
> >> Thanks for your help and my apologies if this is the worst question of the
> >> week.
> >>
> >> Tim Rogers
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to