php and asp lining in harmony
The vast majority of my code is html but all of my pages are php extentions, whether I have any php code in the page or not. No special coding is necessary for html if placed outside of the <? ?> tags and you can even use html inside the tags using something like the print function (and slashes in front of all quotation marks). Basically they can live in harmony.
But my question is about asp. Can asp co-exist with php? Can asp code be used within a php document or can php code be used within an asp document? Just curious. Thanks.
Mark Hensler posted this at 00:42 — 12th March 2004.
He has: 4,048 posts
Joined: Aug 2000
I would think that on the language level, they would be fine... For example:
<?php
ini_set("asp_tags", false);
echo "php code
?>
<%
Response.Write "ASP code"
%>
<?php
echo "back to php";
?>
As for file extension. It doesn't matter. As long as your web server knows to pass the file through one interpreter then redirect the output to the next interpreter.
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.