Create txt file in PHP -


I am creating a text file in PHP, the file is created in the right format from the local PC and if I'm trying online I do not have a line, it's a brake and is not looking formatted.

I am using this code.

  header ("content-type: app / txt"); Header ("content-length:". Size ($ content)); Header ("content-dispute: inline; filename =". $ File); Print $ content; Die;  

If there is any solution please share with me.

Thanks in advance.

You have a typo:

  header ("content- Length: ". Size ($ content));  

Also, you should use the

  header ("content-type: text / plain");  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -