我是PHP的新手,我不知道如何正确地做事,我需要帮助
我有register-page.php,它看起来像这样:
browser.driver.get('https://angularjs.org/')
el = element(by.css('.first'))
el.getText().then(function(text){expect(text).toContain("AngularJS is a toolset for")});
从上面的代码中我可以看到,我将文件保存在includes文件夹中,Register.php是保存函数的文件
register-container.php中的表单:
<?php include "includes/functions/Register/Register.php"?>
<?php include "includes/header.php"?>
<?php include "includes/navbar.php"?>
<?php include "includes/registerContainer.php"?>
<?php include "includes/hidden.php"?>
<?php include "includes/footer.php"?>
正如您所看到的,我将表单操作留空了,因为我的代码工作正常 我在底部(页脚下)
包含这段代码:<form action="" class="registerForm" method="post">
<div class="row">
<div class="col-md-12">
<div class="input-group regElements">
<span class="input-group-addon glyphicon glyphicon-envelope"></span>
<input class="form-control " name="regEmail" type="email" placeholder="Email" autofocus>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="input-group regElements">
<span class="input-group-addon glyphicon glyphicon-user"></span>
<input class="form-control " name="regUsername" type="text" placeholder="Username" >
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="input-group regElements">
<span class="input-group-addon glyphicon glyphicon-lock"></span>
<input class="form-control " name="regPassword" type="password" placeholder="Password" >
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="input-group regElements">
<span class="input-group-addon glyphicon glyphicon-lock"></span>
<input class="form-control " name="regPassword2" type="password" placeholder="Confirm Password" >
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="errors">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="input-group regElements">
<input id="regButton" name="registerButton"type="submit" class="btn" value="Register Now!">
</div>
</div>
</div>
</form>
但是现在我意识到通过这样做我不能使用Sessions,当我尝试收到错误时。
如果有人能帮助我,我不知道如何解决这个问题非常感谢。如果我需要更多信息,请告诉我们谢谢
编辑:我已经意识到,当我将寄存器功能置于顶部时,它可以工作,但显示错误的功能不是<?php include "includes/functions/Register/Register.php"?>