Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:59:07+00:00 2026-06-05T21:59:07+00:00

i am trying to echo a html files contents from a php script. Quite

  • 0

i am trying to echo a html files contents from a php script. Quite simple implementation

$response=file_get_contents("second.html");

echo $response;

When i hit the html file directly all the content seems ok but when i get the echoed string it is different, The html contains javascript with utf8 strings and escape characters. It seems that “echo” is changing the string because i tried saving the $response string in a second html file and that appears ok also. My question is, is there a way to just plainly give the string with no processing.

Also it seems the echoed html works on firefox, but not on chrome, the file html works on both.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:59:08+00:00Added an answer on June 5, 2026 at 9:59 pm

    What do you get if you do:

    var_export(get_magic_quotes_gpc());
    

    Is it on? (true)

    If so:

    http://www.php.net/manual/en/security.magicquotes.disabling.php

    or

    $response = stripslashes(file_get_contents("second.html"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to echo a result from xml into my html code form
I'm trying echo the contents of an object in a JSON format. I'm quite
Good day, I'm trying to convert my site from ANSI-encoded PHP files to UTF-8.
Demo.php file <?php function write_back() { echo file_get_contents(sample.html); sleep(2); write_back(); } write_back(); ?> Resulted
I am trying to echo a javascript alert message in php but I am
please i need you help with my script.. I'm trying to echo some content
I am trying to send data from an Android app to a PHP file
I'm trying to accomplish the following, I'm sending a HTML email using PHP Mailer
i've this problem for days... I have to load from php the entire html
I'm trying to learn HTML and PHP. In an example which i found over

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.