As UTF-8 force in PHP

Asked

Viewed 47 times

0

I’m programming in PHP. I have a div and inside it I’m calling another screen for example:

</div><!-- End col-md-6 -->
            <?php require_once ("partialView/carrinho_view.php"); ?>

That screen carrinho_view.php only one other div inside with a stroller, and I can’t put my header.php, because it is already being called on the current screen that I am calling the carrinho_view.php... With that the screen carrinho_view.php is not accepting the goal utf-8. How do I get this screen to accept?

  • 1

    Look if it helps you ai https://answall.com/questions/22394/enviar-email-accentuos-bd-uft8

  • I’ve used (<? php header('Content-Type: text/html; charset=UTF-8'); ? > and it doesn’t work, but thank you very much!

  • Dear Mayos, when using require include and related have to have all documents saved by the text editor as UTF-8, outside that have to adjust the database connection too, I explained in detail in this reply, read calmly, it teaches step by step how you understand the coding in documents, bank and header sending, reply: https://answall.com/a/43205/3635 ... it got big because each person uses a text editor and almost always someone appeared with a remotely linked doubt and I was forced to evolve the answer, but the general who needs to study with it is this: [...]

  • [...]HTTP response headers, connection to the database (charset of the moment to connect), database structure (encoding) and encoding of all documents. php, if you read it calmly you will understand well how it works. Codecs and HTTP is something that takes a lot of time to learn, not even in months, so be patient and read patiently that will solve quickly and learn the basics ;) ... ps: I know professional programmers who until today do not understand well codecs and HTTP structure, pq skip the basics, so take it easy and let me know of any need

  • 1

    Right William Nascimento, thank you very much friend!

  • 1

    It worked perfectly Guilherme Nascimento, helped me a lot. Thank you!

  • For nothing dear Mayos, all the best!

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.