variable in include file

P

PTM

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.
 
A

Andy Dingley

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.
 
P

PTM

Andy said:
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.
 
A

Andy Dingley

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.
 
P

PTM

Personally I haven't given much notice for PHP. I like Perl more and
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.
 
A

Andy Dingley

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.
 
P

PTM

Andy said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,118
Latest member
LatishaWhy
Top