隐藏错误报告并插入数据库

时间:2015-12-28 06:38:14

标签: php mysql

服务器可以使用php和mysql自动将错误报告插入数据库,如果error_reporting = false且用户没有在浏览器中查看错误?我只需要管理员在用户视图下获取错误。

以及获取所有错误报告的脚本?

1 个答案:

答案 0 :(得分:1)

隐藏网络浏览器上的错误 - 来自Turn Off Display Error PHP.ini 在php文件的顶部添加:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<ion-view view-title="{{pdfName}}">
  <ion-content class="padding">

<div class="" ng-controller="BookController">
  <h3>{{pdfName}}</h3>
  <!-- <div class="card"> -->

<!--   <div class="slide-animate" ng-include="'pdf/1.html'"></div>

</div> -->
<div ng-controller="BookController" class="text-center container">
      <div class="row">
        <div class="btn-group">
          <button class="btn" ng-click="pdfURL='test.pdf'">Load test.pdf</button>
          <button class="btn" ng-click="pdfURL='test2.pdf'">Load test2.pdf</button>
        </div>
        <div class="btn-group">
          <button class="btn" ng-click="gotoPage(1)">|&lt;</button>
          <button class="btn" ng-click="prevPage()">&lt;</button>
          <button class="btn" ng-click="nextPage()">&gt;</button>
          <button class="btn" ng-click="gotoPage(totalPages)">&gt;|</button>
        </div>
      </div>
      <div class="row">
        <span class="label" ng-show="totalPages">{{currentPage}}/{{totalPages}}</span>
      </div>
      <div class="row">
        <pdfviewer src="{{pdfURL}}" on-page-load='pageLoaded(page,total)' id="viewer" load-progress='loadProgress(loaded, total, state)'></pdfviewer>
      </div>
    </div>
  </div>
  </ion-content>
</ion-view>

登录mysql 查看Outputting all PHP errors to database not error_log

上接受的答案