I'm not really sure what you mean in terms of ASP needing two or more pages?

<%
dim pageAction
pageAction = Request("action")

select case pageAction
  case "postit": InsertFormData()
  case else : ShowForm()
end select

sub InsertFormData()
end sub

sub ShowForm()
  Response.Write("<html><head></head><body>TheForm</body></html>")
end sub
%>

or whatever.


as far as isset goes?

function isset(byval checkVar)
  dim ret
  if (len(checkVar) > 0) then
    ret = true
  else
    ret = false
  end if
end function



The ONLY thing I can think of that ASP misses that can be done easily in
PHP, is dynamic includes, ie:

$code = _GET['code'];
include($code.'.php');


the asp inlude equivelent is
<!--#include file="whatever.asp"-->

and thats handled by the SSI engine before it gets passed over to the ASP
engine. So no dynamic includes for ASP.

Ofcourse there are other features that PHP has that ASP does not, and vice
versa. Right tool for the job, right tool for the job.



-----Original Message-----
From: See kok Boon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 8 January 2003 6:29 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP vs. ASP


There is one minor difference that caused a major change in structure of the
two scripting language.

PHP offers the isset() function but ASP don't. in a way there are the pros
and cons.

For PHP, you can create the whole site in one page, even though that would
not be advisable. Because of isset(), you can get input and display output
using the same page. However, this would result in security loop holes.

Whereas for ASP, without the isset() keyword, ASP structures are usually
made up of at least 2 pages. One for receiving input and the other for
display the result, output. This of cos patches the security holes.

In a way, PHP provides a simpler way for programmer. Also, one can chose not
to use isset() !!

But ASP only supported on win platforms... =(



-----Original Message-----
From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]]
Sent: 04 January 2003 10:50
To: [EMAIL PROTECTED]
Subject: [PHP] PHP vs. ASP

Hi!
How does PHP differs from ASP?

Are there any advantages in using PHP over ASP? Or the other way around?

Thanks!



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to