What does this PHP code do?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atlkhan
    New Member
    • Apr 2007
    • 39

    What does this PHP code do?

    Can someone please explain this php code. I would be grateful

    [code=html]
    <?php
    // --------------- file tape2matlab2php .php

    // NOTE: if web-server and matlab server are NOT located on the same mashine please use share name.

    $path_data ="\MB_data\Fiel d_Signals\";
    $path_out_file ="MB_dataout ";
    $path_descr ="MB_datades c";
    $path_MB_def ="MB_dataMB_def ";
    $path_HDF ="MB_dataout ";

    ?>




    <?php

    if (!isset($mode)) {
    $mode="init";
    }
    switch ($mode) {
    case 'init':
    include('inc_in it_page.php');
    break;
    case 'run':
    ?>
    <form action="/cgi-bin/matweb.exe" method="POST">
    <input type="hidden" name="mlmfile" value="Tape2coo rd">
    <input type="hidden" name="dfname" value=" <?PHP echo $dfname ?>" >
    <input type="hidden" name="path_desc r" value=" <?PHP echo $path_descr ?>" >
    <input type="hidden" name="path_data " value=" <?PHP echo $path_data ?>" >
    <input type="hidden" name="path_out_ file" value=" <?PHP echo $path_out_file ?>" >
    <input type="hidden" name="path_HDF" value=" <?PHP echo $path_HDF ?>" >
    <p><input type="submit" name="Submit" value="Execute" ></p>
    </form>
    <?PHP
    break;
    default:
    echo "End'";
    break;
    }
    ?>
    </BODY>[/code]

    [Please use CODE tags when posting source code. Thanks! --pbmods]
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Which part of it did you want to learn more about?

    Comment

    • atlkhan
      New Member
      • Apr 2007
      • 39

      #3
      Originally posted by pbmods
      Which part of it did you want to learn more about?

      Mostly the part where form inputs are given and what is going on in the swithc case statement.

      Also, is it possible if I run this php script on my webserver . Where I am passing some inputs from the flash and this script pass those inputs to the matweb.exe program as its doing in this case.( My point is does it require any user interaction)

      Comment

      Working...