ich immer ein PHP-Wert in eine Bootstrap-Taste einige Probleme habe, die in HTML istphp echo funktioniert nicht in HTML
Dies ist mein Code:
<html>
<head>
<title>Samples</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
<body>
<a href="#" class="btn btn-info" role="button"><?php echo "Samples"; ?> Stuff</a>
</body>
</html>
Anstatt also die Taste sagen " Samples Stuff "- der Button sagt einfach" Stuff ". Es ist wichtig, dass die Schaltfläche einen PHP-Wert annimmt, da ich schließlich einen DB-Wert in die Schaltfläche setzen werde - aber ich kann nicht einmal die Grundlagen zum Laufen bekommen
Warum funktioniert es nicht?
Auch müssen Sie einen lokalen Server einrichten PHP-Dateien auf localhost zu sehen. – Sarcoma