ASP VBScript Details :: from PHP to ASP

This thread was displayed: 244 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
Leigh Rajge
08-07-2006 03:02:59 GMT +2

Hi there,


Can anyone help me translate this PHP code to ASP? Please, it'll be a great help for the project im doing. thanks!


<?php
  if ( isset($_GET['go']) and file_exists("txt_{$_GET['go']}.php") ) {
    include ("txt_{$_GET['go']}.php");
  }
  else {
    include ("txt_home.php");
  }
?>

Back | Reply | Quote | Top
Cristian IVASCU[InteraktOnline]Adobe Systems Romania staff
08-09-2006 12:40:03 GMT +2

Hi Leigh,

The code would be similar to this:


   Dim fso: Set fso = Server.CreateObject("Scripting.FileSystemObject")
   fileName = "txt_{" & Request.QueryString("go") & "}.asp" 
   If Request.Querystring("go") <> "" AND fso.FileExists(fileName) Then
%>
<!-- #include file="<%=fileName%>" -->
<%
  Else
%>
<!-- #include file="txt_home.asp" -->
<%
  End If
Set fso = Nothing
%>

Hope this helps,
Cristian

Reply | Quote | Top
Sign In
Sign In to see your information.
© Adobe Systems Romania. All rights reserved.