为什么在phpdesktop chrome中显示此错误“未捕获的ReferenceError:在HTMLButtonElement.onclick中未定义openFile”?

I want to develop a desktop application by using Phpdesktop Chrome.There Im using onclick for show data in right side window .But it doesnt work

html:

<div class="col-sm-4 col-md-4">
    <ul>
       <li onclick="openFile('Input')"><a  href="#Input">Input Products</a></li>
       <li onclick="openFile('Out')"><a href="#Out">Out Products</a></li>  
    </ul>
</div>

<div class="col-sm-8 col-md-8">
    <div id="Input" class="file one">
                <span onclick="this.parentElement.style.display='none'"></span>
                        <!--show input data from database-->
                        <?php

                            $DATABASE_HOST = 'localhost';
                            $DATABASE_USER = 'root';
                            $DATABASE_PASS = '';
                            $DATABASE_NAME = 'store';
                            // Try and connect using the info above.
                            $con = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME);
                            if ( mysqli_connect_errno() ) {
                                // If there is an error with the connection, stop the script and display the error.
                                die ('Failed to connect to MySQL: ' . mysqli_connect_error());
                            }

                            $result = mysqli_query($con, "SELECT * FROM input");
                            echo "<table border='1'>
                                <tr>
                                  <th>Date</th>                                  
                                  <th>Product Name</th>
                                  <th>Unit</th>
                                  <th>Qty</th>                                   
                                </tr>";

                            while($row = mysqli_fetch_array($result))
                                  {
                                  echo "<tr>";
                                  echo "<td>" . $row['Date'] . "</td>";

                                  echo "<td>" . $row['Poductss_name'] . "</td>";

                                  echo "<td>" . $row['Unit'] . "</td>";
                                  echo "<td>" . $row['Input_qty'] . "</td>
                                  echo "</tr>";
                                  }

                            echo "</table>";

                            mysqli_close($con);
                        ?>  <!--end showing input data from database-->     
    </div>
</div>

Script:

<script>
        function openFile(fileName) {
          var i;
          var x = document.getElementsByClassName("file");
          for (i = 0; i < x.length; i++) {
            x[i].style.display = "none";  
          }
          document.getElementById(fileName).style.display = "block";  
        }
    </script>

When i click the Input Products or Out Products it`s shown an error. Error is : Uncaught ReferenceError: openFile is not defined at HTMLButtonElement.onclick

But then i run this without Phpdesktop chrome its show ok.