Jump to content

Die() And Txt


es131245
 Share

Recommended Posts

2 questions....die(" #Some wierd russian text # ");and when i open txt in browser likehttp://localhost/qwerty.txtif i use eng everything is good but for other languages how can i set encoding???Something like <meta http-equiv="content-type" content="text/html" charset="utf-8" />

Link to comment
Share on other sites

how can i attach heading to txt file or die() ?????
If in PHP, you place that function right before you die(), i.e.
header('Content-Type:text/plain;charset=utf-8');die(" #Some wierd russian text # ");

If in a txt file... you'll have to append the header with an .htaccess file, assuming you have mod_headers enabled and .htaccess rights to begin with.

Link to comment
Share on other sites

  • 2 months later...
but iffopen ('123.txt') or die('utf-8 sign');
Doesn't matter. If it's going out to the browser,
header('Content-Type:text/plain;charset=utf-8');

needs to be present beforehand.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...