Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // define this variable in some config.file.php you include in your project
- $global_config = array('CurrentStaticVersion' => '0.1');
- // returns /v-0.x/static/css/some.css
- function getStaticUrl(path) {
- return "/v-" . $global_config['CurrentStaticVersion'] . "/" . path;
- }
- ?>
- <html>
- <head>
- <title></title>
- <link rel="stylesheet" type="text/css" href="<?php echo getStaticUrl('/static/css/some.css'); ?>" />
- </head>
- <body>
- </body>
- </html>
Add Comment
Please, Sign In to add comment