variable in include file

Discussion in 'HTML' started by PTM, Nov 12, 2007.

  1. PTM

    PTM Guest

    PTM: My web page includes a file containing lines like this:
    <td><a href="Do.gif"><img src="t_Do.gif"></a><br>Do.gif</td>

    The result is a page, where the there is name of the file under a thumb,
    which can be clicked and produces a view of the original picture. like in
    http://ptm2.cc.utu.fi/~ptmusta/kuvat/paloma/

    is there any way to set this file name 'Do.gif' as an variable and make
    the browser use it in the lines ?

    The best thing would be, if I could include a file with only the names
    and make the browser build the lines.
     
    PTM, Nov 12, 2007
    #1
    1. Advertising

  2. PTM

    Andy Dingley Guest

    On 12 Nov, 07:52, PTM <> wrote:

    > is there any way to set this file name 'Do.gif' as an variable and make
    > the browser use it in the lines ?


    Not (practically) by includes, but this would be trivial for any
    server-side scripting language. It's time for you to move up to the
    next level of complexity as a developer!

    PHP is a popular choice for beginners, as it works well enough, it's
    easy enough to learn, and it's supported for free by many hosts.
     
    Andy Dingley, Nov 12, 2007
    #2
    1. Advertising

  3. PTM

    PTM Guest

    Andy Dingley wrote:
    > On 12 Nov, 07:52, PTM <> wrote:
    >
    >> is there any way to set this file name 'Do.gif' as an variable and make
    >> the browser use it in the lines ?

    >
    > Not (practically) by includes, but this would be trivial for any
    > server-side scripting language. It's time for you to move up to the
    > next level of complexity as a developer!
    >
    > PHP is a popular choice for beginners, as it works well enough, it's
    > easy enough to learn, and it's supported for free by many hosts.
    >

    PTM: Thanks.
    The code pieces I pasted in my previous mail were generated by a Perl
    script I have generated. I have two version of this 'Album' system. The
    smaller 'viewer' containing just one script and one shtml page. The
    larger contains abt. 10 scripts and abt. the same quantity of web pages.
    The larger system contains more than 1500 lines of code and is handling
    about 10000 pictures. Some pages are static and some are generated by
    the scripts when needed.
    I think I have reached a kind of status there.

    Still there is a lot to learn.
    Personally I haven't given much notice for PHP. I like Perl more and
    have used JavaScript a little. Now I have found, that these are not
    enough. I got to take more tools in my hands.

    Still I'm looking for ways to generate pages, which can handle data read
    from config files.
     
    PTM, Nov 12, 2007
    #3
  4. PTM

    Andy Dingley Guest

    On 12 Nov, 11:14, PTM <> wrote:

    > Personally I haven't given much notice for PHP. I like Perl more and
    > have used JavaScript a little.


    If you like Perl already, give Python a try. It works for web back-
    ends (although not so easy to find hosting for) and it's a much better
    language than either Perl or Python.
     
    Andy Dingley, Nov 12, 2007
    #4
  5. PTM

    PTM Guest

    >>Personally I haven't given much notice for PHP. I like Perl more and
    >>have used JavaScript a little.

    >
    > If you like Perl already, give Python a try. It works for web back-
    > ends (although not so easy to find hosting for) and it's a much better
    > language than either Perl or Python.
    >

    PTM: I'll give it a try even though I don't understand what a new
    language might give to me :)
    I think I have tried or used about any programming language there has
    been, beginning with Basic in VIC-20.

    BTW. I visited http://docs.python.org.
    Most of the material in the Python pages seems to be written by people,
    who are accustomed to be paid in $/word.
     
    PTM, Nov 12, 2007
    #5
  6. PTM

    Andy Dingley Guest

    On Mon, 12 Nov 2007 23:16:25 +0200, PTM <> wrote:

    >Most of the material in the Python pages seems to be written by people,
    >who are accustomed to be paid in $/word.


    I liked the Beazley book. If you already know "programming", it teaches
    the language alone pretty well. It also works as a reference afterwards.

    I'm not a fan of on-line tutorials. I just prefer books.
     
    Andy Dingley, Nov 12, 2007
    #6
  7. PTM

    PTM Guest

    Andy Dingley wrote:
    > On 12 Nov, 11:14, PTM <> wrote:
    > If you like Perl already, give Python a try.

    PTM: I didn't go to Python this time. I found a solution to my problem.
    Thanks to you. You made me think the problem from another direction. I
    threw the original code out and wrote a new Perl code which generates
    all the needed pages without building include files. I got rid of the
    configuration- and temporary data files.
    In a matter of fact I now have a distributable packet with only one Perl
    script, one shtml -file and the documentation. The next step is to make
    the script generate the web page in the installation.

    Thanks
     
    PTM, Nov 16, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Bazarov

    #include "file" -vs- #include <file>

    Victor Bazarov, Mar 5, 2005, in forum: C++
    Replies:
    4
    Views:
    544
    Exits Funnel
    Mar 6, 2005
  2. PTM
    Replies:
    1
    Views:
    337
    Andy Dingley
    Nov 12, 2007
  3. naveeddil
    Replies:
    0
    Views:
    587
    naveeddil
    Jan 4, 2008
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    947
    Andreas Bogenberger
    Feb 22, 2008
  5. Eric
    Replies:
    10
    Views:
    479
Loading...

Share This Page