Dodgy PHP Relative dates written 5 years ago

Sennir.co.uk

I recently changed the way that relative dates are confabulated on the site. Now it’s much nicer, take a look below if you want to know how it’s done.

Relative dates code

And If there’s any php buffs reading that could spot any glaring errors I’d be grateful ..

← previous entry | next entry → Mon 6th Jun 2005 - 02:59 | 7 comments | tagged with Programming, Sennir News

 Comments 7 comments made

How did you make that link open the page of code for viewing and not parsing? is it all in: echo ‘<…>’; ?

Nope, just use the following:


    <?php
        highlight_file
("<file_to_be_highlighted>");
    
?>

and it produces the pretty coloured syntax, to test this you can just look at the source and that will show you the php sans colours.

See also php highlight_string manual.


    I can make a post-it note too!


     I can make a post-it note too!

Yes, would you like a cookie?

Although you’ve mastered the art of post-it notes, you don’t seem able to remember your own website URL.

This worries me.

Speaker Icon paully 1 day later

originally posted by

How did you make that link open the page of code for viewing and not parsing? is it all in: echo ‘<…>’; ?

is this working?

originally posted by paully

originally posted by Paul

How did you make that link open the page of code for viewing and not parsing? is it all in: echo ‘<…>’; ?

is this working?

Yes, it is

Speaker Icon Paul 1 day later

Very nice :D

Leave a reply

Name: displayed next to your comment
Email: will not be displayed
URL: to link back to your site
Comments: Markdown syntax allowed

Notes on leaving replies: