Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( ! function_exists('file_suffix'))
- {
- function file_suffix($file, $format='Ymdhis')
- {
- $CI = get_instance();
- $file_path = FCPATH . ltrim($file, '/');
- if (file_exists($file_path)) {
- return $CI->config->base_url($file) . '?' . date($format, filemtime($file_path));
- }
- else
- {
- return $CI->config->base_url($file);
- }
- }
- }
Add Comment
Please, Sign In to add comment