Paul J Collins wrote:
> Again from CGI:
>> If the first argument is an associative array reference,
> then the keys and values of the associative array become
> the HTML tag's attributes:
>> print a({-href=>'fred.html',-target=>'_new'},
> "Open a new frame");
>> So what you need to write is this:
>> print $cgi->img ({-src => '../../../images/foo.png'});
Groovy. That works and makes a lot more sense actually. I was assuming
that cgi.pm just new what to do with whatever it was given 'cos it knew
the format of the command. Actually, it does seem to do that with
certain tags, but those are ones where the cgi.pm method names don't
correspond exactly to the tag names, eg, startform, submit, etc.
Interesting.
And now to change topic, am I the only one who finds php's lack of
consistency in dealing with different databases annoying? Maybe it
makes sense to exploit each DB's native interface but it makes it bloody
difficult to write code that accesses more than one DB or to migrate
your scripts from one DB to another. Up 'till recently I've been using
MySQl, mostly with perl, but also some PHP. Now the PHP interface to
MySQL is lovely. It's very similar to perl DBI and it's easy to learn.
Then I decide to try to write something to connect to Oracle and I'm
presented with a completely different set of functions. They're not
even vaguely similar to the way you access a MySQL database.
Ggrrrrrrrr... I suppose if you want things to be DB independent you
should just use the PHP ODBC functions, but I think I'll stick with perl
and DBI instead. Much nicer.
Thanks,
Kathryn.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!