jake_feyereisen
jake_feyereisen

Reputation: 739

What is the difference between .log and .txt?

Is there any functional difference between

file_put_contents( '/Users/jake/Development/testing.log', ob_get_clean(), FILE_APPEND );

and

file_put_contents( '/Users/jake/Development/testing.txt', ob_get_clean(), FILE_APPEND );

?

I can open both files in sublime text 2, and I'm not sure what the difference between the extensions is.

Upvotes: 16

Views: 10828

Answers (1)

DarthVader
DarthVader

Reputation: 55022

No there is no difference. You can use either. For convention and to show the purpose log files use .log extension.

and yes you can usually open them with any text editor.

Upvotes: 23

Related Questions