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 3845868
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:18:36+00:00 2026-05-19T16:18:36+00:00

I am working with my php new site. Here I want to write an

  • 0

I am working with my php new site. Here I want to write an html page using php file write code. In this I used file_get_contents. E.g. see below

$page_old.="<table width='1051' border='0' cellspacing='0' cellpadding='0'>";
$page_old.="<tr><td height='50' class='tittle'>Test</td></tr>";
$page_old.="<tr><td class='content'>My content Body</td></tr></table></td></tr>";
$page_old.=file_get_contents('../contents/footer.php');     
fwrite($fp_old,$page_old);
fclose($fp_old);

My footer page contains some php code see below

<td colspan="4"><a href="../more-products.php?feat1_id=YlX>PdRf" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image49','','../images/Kluz_usa_s_over_18.jpg',1)"><img src="../images/Kluz_usa_s_18.jpg" name="Image49" width="276" height="162" border="0" alt="Universal Laser Systems VersaLASER " title="<?=$test_vra?>" ></a></td>

I want to assign the title, alt src value from a php variable. But the result is not correct. E.g. my title tag showing

How I display the actual content from that php variable

Thanks in advance

  • 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-05-19T16:18:37+00:00Added an answer on May 19, 2026 at 4:18 pm

    file_get_contents returns a string with the HTML of the provided url.

    If you want to use fwrite and fclose, you need to open footer.php with fopen.

    But your question does not make sense to me. Do you want to overwrite footer.php with $page_old? If so, you could use file_put_contents and do a file_put_contents('../contents/footer.php', $page_old);.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I am working on restructuring an existing code base. I'm new to php
Working with PHP Xpath trying to quickly pull certain links within a html page.
I am working with php and want to have a page that has a
index.php has this jquery code which loads notifications.inc.php into a div on the page
I am EXTREMELY new to the html/php scene but I have been working at
Regarding the audio on this page: http://ebonytay.com/site/composer.php?clip=getOutOfTown#mediaplayer The audio controls show up in Chrome
I am working on a drupal 7 site and am very new to this.
As of this writing, I'm using PHP SDK v3.1.1-12, and I used the same
This is my first question on this site. I'm new to php but i've
Okay, I'm having some serious issues here. I'm new to this site, and new

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.