我如何将这个PHP脚本添加到我的.html页面

时间:2014-02-22 00:53:31

标签: facebook

<?php
// check for minimum PHP version
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
exit('Sorry, this script does not run on a PHP version smaller than 5.3.7 !');
} else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
// if you are using PHP 5.3 or PHP 5.4 you have to include the password_api_compatibility_library.php
// (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
require_once('libraries/password_compatibility_library.php');
}
// include the config
require_once('config/config.php');

// include the to-be-used language, english by default. feel free to translate your   project and include something else
require_once('translations/en.php');

// include the PHPMailer library
require_once('libraries/PHPMailer.php');

// load the login class
require_once('classes/Login.php');

// create a login object. when this object is created, it will do all login/logout stuff           automatically
// so this single line handles the entire login process.
$login = new Login();

// ... ask if we are logged in here:
if ($login->isUserLoggedIn() == true) {
// the user is logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are logged in" view.
include("views/index1.php");

} else {
// the user is not logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are not logged in" view.
include("views/not_logged_in.php");
}

我正在尝试将此.php登录脚本添加到HTML网页。我和一个伙伴设法将我们下载的.php登录脚本与数据库连在一起。我们的数据库与我们的.php一起使用,允许新用户唱歌和登录。还有SMTP验证电子邮件。 Ebery的工作正常,但我们的问题是,当人们进入登录页面时,它只是一个带有用户名和密码框的白页。我们想要使用我们的Web模板并将其用作我们的后台登录(以便它与其他站点的背景相同。)我们只想要登录页面,注册以及所有其他.php文件到匹配我们的网站。

它只是丑陋有一个普通的白色屏幕,1个用户名框和1个密码框和一个提交按钮。感谢。

我也被告知.css会有所帮助。我的整个网站都使用style.css文件来显示HTML页面。有没有办法让.php页面也能正常工作?再次,谢谢。

1 个答案:

答案 0 :(得分:1)

您可以在<?php?>标记之外添加HTML。使用HTML根据自己的喜好设置页面样式。

相关问题