У меня есть HTML-файл с HTML-кодом.Как перейти с HTML-файла на PHP-файл?
Ниже приведен HTML-код:
<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>
Просто измените расширение файла .html на .php (index.html на index.php), и если вы хотите добавить любой PHP-код, вы должны использовать теги <?php and ?>.
<?php and ?>
В вашем случае просто измените расширение вашего имени файла.Пример: yourfilename.html до yourfilename.php.
yourfilename.html
yourfilename.php
изменить расширение файла HTML.Например: index.html будет index.php
index.html
index.php