0
我有一個標題頁,其中包含導航欄和必要的CSS,JS的。包含標題頁會話錯誤
我想從聯繫頁面調用標題頁,但出現了問題。
我在聯繫頁面上發生此錯誤。
- 警告:在session_start():不能發送會話緩存限制器 - 已經發送了頭(輸出開始在C:\ XAMPP \ htdocs中\測試\包括\的header.php:84)在C:\ XAMPP \ htdocs中\ test \ contact.php on line 3
跟隨聯繫頁面代碼。
<?php include_once ("includes/config.php");
include_once ("includes/header.php");
session_start();
require_once'includes/phpmailer/security.php';
?>
<div class="container">
<div class="contact">
<?php if(isset($_GET['CaptchaPass'])){?>
<div >message sent</div>
<?php } ?>
<?php if(isset($_GET['CaptchaFail'])){?>
<div >message failed</div>
<?php } ?>
<form action="includes/contact-config.php" method="post">
<div class="form-group">
<label for="name">Your Name *</label>
<input type="text" name="name" autocomplete="off" required="" class="form-control" placeholder="Enter Name" <?php echo isset ($fields['name'])? 'value="'.e($fields['name']).'"':''?>>
</div>
<div class="form-group">
<label for="email">Your Email address * </label>
<input type="email" name="email" autocomplete="off" required="" class="form-control" placeholder="Enter Email"<?php echo isset ($fields['email'])? 'value="'.e($fields['email']).'"':''?>>
</div>
<div class="form-group" >
<label for="message">Your Message *</label>
<textarea class="form-control" rows="8" id="comment" required="" name="message"<?php echo isset ($fields['message'])? e($fields['message']):''?>></textarea>
<br>
<div class="g-recaptcha" data-sitekey="6LcyfhgUAAAAAKunkwqqxFJSOPUzYbNmppLQbcWc"></div>
<input type="submit" value="Send" id="ContactButton" class="form-control" class="btn btn-primary">
</div>
</form>
</div>
</div>
</body>
<?php include ("includes/footer.php");?>
的header.php文件夾路徑 - > C:\ XAMPP \ htdocs中\測試\包括\的header.php
contact.php文件夾路徑 - > C:\ XAMPP \ htdocs中\測試\ contact.php
你的'config.php'或'header.php'正在發送一些輸出。在包含 – bansi
之前移動'session_start'感謝回覆bahsi:') – Onur