user3480687
user3480687

Reputation: 69

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>

Upvotes: 0

Views: 27304

Answers (3)

pathiranag
pathiranag

Reputation: 36

Just change file extension .html to .php (index.html to index.php).

If you want to add any PHP code, you have to use the <?php and ?> tags.

Upvotes: 1

Tahir Musharraf
Tahir Musharraf

Reputation: 143

In your case, just change the extension of your filename. Example: yourfilename.html to yourfilename.php.

Upvotes: 0

suvojit_007
suvojit_007

Reputation: 1728

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

Upvotes: 4

Related Questions