Home > Backend Development > PHP Tutorial > When making ajax requests, debugging the code seems too annoying, so I have to write the return information to a file and observe the debugging.

When making ajax requests, debugging the code seems too annoying, so I have to write the return information to a file and observe the debugging.

WBOY
Release: 2016-07-25 09:01:18
Original
887 people have browsed it
  1. class Record
  2. {
  3. var $pf;
  4. public function r_start($file = 'record')
  5. {
  6. ob_start();
  7. echo "____________________________________________n";
  8. $this->pf = fopen($file, 'a+' );
  9. }
  10. public function r_close()
  11. {
  12. echo "n____________________________________________n";
  13. $out= ob_get_contents() ;
  14. ob_end_clean();
  15. fwrite($this->pf , $out);
  16. fclose($this->pf );
  17. }
  18. }
  19. ?>
复制代码


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template