Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function unescapedFiles($path){
- $files = array_diff(scandir($path), array('.', '..'));
- foreach ($files as $file) {
- $file = str_finish($path, '/') . $file;
- $content = json_decode(file_get_contents($file), true);
- $content = json_encode($content, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
- file_put_contents($file, $content);
- }
- }
Add Comment
Please, Sign In to add comment