×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: PHP
Posted by: Shelane French
Added: Jan 24, 2020 9:41 PM
Views: 4244
Tags: no tags
  1. //Lasso
  2. define_tag('setHTTPstatus', -required='statuscode');
  3.  // replace status code but keep leading HTTP with version
  4.             $__http_header__ = string_replaceregexp($__http_header__, -find='(^HTTP\\S+)\\s+.*?\r\n', -replace='\\1 ' + #statuscode + '\r\n');
  5. /define_tag;
  6. setHTTPstatus('404');
  7.  
  8. //PHP
  9. header('HTTP/1.1 404 Not Found');