Advertisement
Whistik

Untitled

Jul 13th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function replace_extension($filename, $new_extension) {
  2. $info = pathinfo($filename);
  3. return $info['dirname']
  4. . DIRECTORY_SEPARATOR
  5. . $info['filename']
  6. . '.'
  7. . $new_extension;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement