php to ASP code

Last post 07-03-2008 11:44 AM by Klev. 1 replies.

Sort Posts:

  • php to ASP code

    07-03-2008, 11:21 AM
    • Loading...
    • captnops
    • Joined on 07-03-2008, 3:18 PM
    • Posts 1

     I am attempting to add some dynamic elements to a site I am playing with and I am using VBscript with ASP for the site.  I have a block of PHP code functionality that I want to use, could someone help me convert php functionality to vbscript?

     

    <?php 
    if (!isset($_GET['page'])) $page= 'accueil'; else $page= $_GET['page'];
    switch($page)
    {
    case 'accueil': include ('accueil.htm');break;
    case 'presentation': include ('presentation.htm');break;
    case 'suite':include ('suite.htm');break;
    case 'fin':include ('fin.htm');break;
    }
    ?>
     
    Thank you 

     

  • Re: php to ASP code

    07-03-2008, 11:44 AM
    Answer
    • Loading...
    • Klev
    • Joined on 01-30-2007, 6:38 PM
    • Russia
    • Posts 46

     

    Dim page
    if Request.QueryString("page")="" then
       page = "accueil"
    else
       page=Request.QueryString("page")
    end if
    
    select case page
       case "accueil": Server.Execute("accueil.htm")
       case "presentation" : Server.Execute("presentation.htm")
       case "suite": Server.Execute("suite.htm")
       case "fin" : Server.Execute("fin.htm")
    end select
     Please note that using Server.Execute you'll not have any variables in included files. If you need them you should use SSI include statement instead.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter