Re: Why PHP ?
| From: | Dan Wilson | Date: | Mon, 11 Dec 2000 09:09:29 +0000 |
| Subject: | Re: Why PHP ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29639@lists.php.net to get a copy of this message | ||
Sure.. you can do that, but it still pulls in both files. It's just like
having all the code from both files in there with an if statement around
them.
In ASP, the include directive is processed even before the ASP code begins
processing. If you want to do something like the following (which I do
consistently):
include("$action.inc.php")
it won't work.
-Dan
> Are you sure this can not be done. I remember we having a multi Language
> Project, where I did:
> <% if language = "E" then %>
> <!--#include file="english.asp"-->
> <% elseif language = "F" then %>
> <!--#include file="french.asp"-->
> ...
> <% end if %>
>
> Howeverwe only defined constants in the files included like that, so you
> might not be able to define functions in there, which would then again
> mean that PHP is superior, which it is.
>
> > Ack - another one. You can't do dynamic includes:
> >
> > PHP
> > <? if (blah) { include("blah.php"); } else { include("foo.php"); }
> > ?>
> >
> > Just CAN NOT be done in ASP2.5. ASP3 introduces a workaround
> > by introducing server.execute as a server function - you can execute
> > another ASP script and include the results. End result should normally
> > be the same, but it's NOT including the second file in the first - they
> > CAN'T do that, and apparently don't want to, else they'd have done it.
>
> --
>
> Florian Clever
>
> fc@clever-soft.com
> http://www.Clever-Software-Solutions.de/
>
> PGP Key @ ldap://certserver.pgp.net/
>
> "Always listen to experts. They'll tell you what can't be done, and why.
> Then do it. " -- Robert A. Heinlein
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net