Re: Dynamic Pages

From: Ashmodai (ashmodai_at_mushroom-cloud.com)
Date: 01/30/05


Date: Sun, 30 Jan 2005 01:52:33 +0100

Shane Malden scribbled something along the lines of:
> Hi, I am trying to create a page which will automaticlly change the size of
> tables/graphics etc based on the screen resolution. Eg, if someone is using
> a 800x600 the page layout will utilise this. If the same webpage is
> diaplayed on a 1024x768 or 1280X1024 the cells are adjusted according. By
> doing something like this could you make the logo change size by using a
> percent size in a table cell or is there a better method than tables? If
> anyone is able to help with tips or any examples (code or url reference) it
> would be appreciated.

The window size (which is more reliable than the screen resolution in
this case) can be determined via JavaScript -- IIRC the call is
different for Mozilla/Netscape and MSIE tho.

You could either pass the values to the PHP application or perform the
size adjustment client-side.

> Also, what page layout is better to use.. eg.. html, php,asp, etc. The
> site will be hosted on apache on a Linux Server.

HTML is a markup language and thus doesn't "do" anything. It's what you
send to the browser in order to display a website (unless you're some
en-vogue designer who thinks Flash is something to author websites
with). The question would rather be SSI or PHP here. Server Side
Includes are very limited in comparison to real scripting languages so
it really depends on what you want to do.

PHP vs ASP is a different issue. Both got their pros and cons. I think
in general the Microsoft camps are pro ASP and the Linux/OSS camps are
more pro PHP, but that might only be true for ASP.NET.

I have never tried ASP because I don't trust ASP (or rather, MS .NET),
so my opinion isn't really qualified.

Another thing is PHP vs Perl, which is a very common religious war
between Apache users. PHP caught me first and Perl doesn't seem to be
able of doing anything PHP can't do so I never got interested in Perl. I
also prefer the syntax and look of PHP over that of Perl, but that's an
entirely aesthetic reason.

Most CGI languages (other than PHP-for-CGI and Perl) were originally
restricted to shell scripts and then became available for web scripting
via CGI, which is the main reason I don't like CGI much (well, that and
the shebang in the beginning of every CGI script and the whole cgi-bin
thing and all that).

There are many alternatives to PHP but from my experience none is really
superior (or neccessarily inferior).

--
Ashmo


Relevant Pages

  • Re: A Lot of Questions from a Noob
    ... Apache, javascript, regex, XML, etc.) I reached the level of ... they work, e.g. Ruby, PERL, Zend, SOAP. ... ASP is a serverside solution. ... Personally I like PHP and/or Perl ...
    (comp.lang.php)
  • Re: Perl vs PHP speed?
    ... 17 of these will press a submit button to invoke the ... PHP (alternatively CGI perl). ...
    (comp.lang.perl.misc)
  • Re: phpBB Worm
    ... perl script on Unix as well as on Windows other than the first line ... suexec mechanism in order to run each customer within his own user's space. ... The downside of using suexec is that PHP as a CGI doesn't offer a small ...
    (Bugtraq)
  • Re: form to email document
    ... I've never worked with PHP or CGI. ... I was hoping for something like the procedure used to upload a form, ... You could do this by writing a custom ASP ...
    (microsoft.public.frontpage.programming)
  • Re: What are the differences between Perl and PHP when handling with Web pages
    ... What are the differences between Perl and PHP? ... anyway for the sake of good programming practice. ... I end up using PHP more for web development than PHP. ...
    (perl.beginners)