Guest User

Untitled

a guest
Mar 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2.  
  3. function unescapedFiles($path){
  4. $files = array_diff(scandir($path), array('.', '..'));
  5. foreach ($files as $file) {
  6. $file = str_finish($path, '/') . $file;
  7. $content = json_decode(file_get_contents($file), true);
  8. $content = json_encode($content, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
  9. file_put_contents($file, $content);
  10. }
  11. }
Add Comment
Please, Sign In to add comment