Search code examples
phphtmlfile-conversion

How to change HTML file to PHP


I have an HTML file with HTML code. How can I change from the HTML file to a PHP file?

The following is the HTML code:

<html>
    <head>
        <title>Instascan – Demo</title>
        <link rel="stylesheet" href="style.css">
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webrtc-adapter/3.3.3/adapter.min.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"></script>
        <script type="text/javascript" src="https://rawgit.com/schmich/instascan-builds/master/instascan.min.js"></script>
    </head>

    <body>
        <div id="app">
            <div class="sidebar">
                <section class="scans">
                    <h2>Scans</h2>
                    <ul v-if="scans.length === 0">
                        <li class="empty">No scans yet</li>
                    </ul>
                    <transition-group name="scans" tag="ul">
                        <li v-for="scan in scans" :key="scan.date" :title="scan.content">{{ scan.content }}</li>
                    </transition-group>
                </section>
            </div>
            <div class="preview-container">
                <video id="preview"></video>
            </div>
        </div>
        <script type="text/javascript" src="app.js"></script>
    </body>

</html>

Solution

  • Change your HTML file extension. For example, index.html will be index.php.