我正在使用rest-server库为API使用codeigniter框架。 我已经在本地主机上使用邮递员进行了测试,但登录时未显示错误,但是当我在名称服务器上上传代码时。现在,我在请求后收到此错误。我不明白为什么会发生此错误。
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: session_start(): Cannot send session cookie - headers already sent by (output started at /public_html/application`enter code here`/controllers/api/Users.php:192)</p>
<p>Filename: Session/Session.php</p>
<p>Line Number: 143</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: public_html/application/libraries/REST_Controller.php
<br />
Line: 397
<br />
Function: __construct
</p>
<p style="margin-left:10px">
/public_html/application/controllers/api/Users.php
<br />
Line: 14
<br />
Function: __construct
</p>
<p style="margin-left:10px">
File: /public_html/index.php
<br />
Line: 315
<br />
Function: require_once
</p>
</div>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: session_start(): Cannot send session cache limiter - headers already sent (output started at /public_html/application/controllers/api/Users.php:192)</p>
<p>Filename: Session/Session.php</p>
<p>Line Number: 143</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: /public_html/application/libraries/REST_Controller.php
<br />
Line: 397
<br />
Function: __construct
</p>
<p style="margin-left:10px">
File: /public_html/application/controllers/api/Users.php
<br />
Line: 14
<br />
Function: __construct
</p>
<p style="margin-left:10px">
File: /public_html/index.php
<br />
Line: 315
<br />
Function: require_once
</p>
</div>