code_junkie

Best way to document AJAX + PHP code?

Nov 11th, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function OutputJs($Content) {
  2. ob_start();
  3. echo $Content;
  4. $expires = DAY_IN_S;
  5. header("Content-type: x-javascript");
  6. header('Content-Length: ' . ob_get_length());
  7. header('Cache-Control: max-age='.$expires.', must-revalidate');
  8. header('Pragma: public');
  9. header('Expires: '. gmdate('D, d M Y H:i:s', time()+$expires).'GMT');
  10. ob_end_flush();
  11. }
Add Comment
Please, Sign In to add comment