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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:19:25+00:00 2026-05-23T01:19:25+00:00

this is my code to generate .doc <?php header(Content-type: application/vnd.ms-word); header(Content-Disposition: attachment; Filename=SaveAsWordDoc.doc); ?>

  • 0

this is my code to generate .doc

<?php
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment; Filename=SaveAsWordDoc.doc");
?>
<html>
<head>
<title>Saves as a Word Doc</title>
</head>
<body>
<h1>Header</h1>
<p>
some text.....
<br />
<img src="logo.jpg" border="0" alt="Logo" />
</p>
<p>
<ul>
<li>List 1</li>
<li>List 2</li>
</ul>
</p>
</body>
</html>

The problem is, when i open the generated .doc file, the image doesn’t showed up.

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-23T01:19:25+00:00Added an answer on May 23, 2026 at 1:19 am

    That is because the image is located somewhere else. It is basically foreign to your .doc. When you opened it. It was probably in a temp folder somewhere and couldn’t locate “logo.jpg” image.

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

Sidebar

Related Questions

I have this php code, with which I am trying to generate a popup
I would like to generate code documentation (C#, .net4) to MS Word file (.doc,
I use this code to generate a random number. Random R = new Random(0);
This is the code that I'm using to generate a DH keypair: KeyPairGenerator keyGen
In a View, code like this will generate the right URL to jump to
Ok, this situation is a little weird but anyway. This PHP code generates several
I am using below code to generate word document using assp.net/c#.net, please tell me
This code is used to generate a XML document from its String representation. It
I use this code to produce a print-preview window. using (XpsDocument doc = new
This issue is somewhat related: Problem with Code Generated by XSD.EXE: Sequence of Elements

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.