我在哪里可以找到the_content()从post_content数据库中获取值的文件?
我想做这个概念但是使用数据库中的另一个内容,到目前为止,我已经向数据库添加了一个新列.post_content2如何使用类似的东西来获取它的值
<?php the_content2(); ?>
Run Code Online (Sandbox Code Playgroud)
我试着查看post-template.php并找到了函数,但没有从数据库post_content中获取值.
美好的一天!我正在尝试创建一个只能在首页输入密码才能访问它的网站(www.mywebsite.com/index.php)
输入密码后,它将从我的public_html外部获取文件home.html.
然后在该页面(home.html)中将使用变量z(www.mywebsite.com/index.php?z=one)链接,该变量将返回1.html或其他页面.
这是我到目前为止所尝试的,但即使我使用www.mywebsite.com/index.php?z=one它仍然打开home.html我可以得到一些帮助吗?和/或是我正在尝试的可能吗?
<?php
$pass = $_POST['pass'];
if ($pass == "1234") {
$page = $_GET['z'];
if ($page == "one") {
include("../1.html");
} else {
include("../home.html");
}
} else {
if (isset($_POST)) {
?>
<!DOCTYPE html>
<html lang="en">
<form role="form" method="POST" style="margin: 0px" action="index.php">
<input type="password" name ="pass" class="form-control" id="pwd"> </input>
<input type="submit" class="btn btn-danger" value="Enter"></input>
</form>
</html>
<?php
}
}
?>
Run Code Online (Sandbox Code Playgroud)