Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Word's Path to images is a problem? when I use PHP + subdirecto

1 view
Skip to first unread message

Barry

unread,
Feb 20, 2010, 1:03:01 PM2/20/10
to
Could someone please cross-post this to a PHP forum if it's better answered
there - thanks.

I have successfully created a web page from a Word doc - let's call it
"word.html"
Word creates a folder to put all the images in (which it names "word_files")
I've uploaded the html file, and the images folder (to an "/uploads"
directory) - and everything displays fine on the browser when I enter the
url: Http://(mydomain)/uploads/word.html .

But I need to INCLUDE the Word.html in another webpage.
So I'm using php as follows:

<?php
require($DOCUMENT_ROOT . "uploads/word.html");
?>

The doc text displays OK, but the images do NOT display - because their path
is wrong!
(e.g. src="./word_files/image002.jpg" )

How do I best get the path to be
src="uploads/word_files/image002.jpg"

I guess I can use Word or PHP to rectify it, but I don't know how!

PS - The 'uploads/' directory is wanted to be retained, because when live
the WOrd doc will be maintained by a non-technical user and uploaded (and
kept separate) from the other web-pages.

--
Thanks ... Barry

Twayne

unread,
Apr 8, 2010, 10:23:09 AM4/8/10
to
Old post, but anyway ... the file with PHP in it must have a
PHP extension. file.php. Otherwise the server ignores PHP
tags.


In news:85576716-A504-48D2...@microsoft.com,
Barry <Ba...@discussions.microsoft.com> typed:


> Could someone please cross-post this to a PHP forum if it's
> better answered there - thanks.
>
> I have successfully created a web page from a Word doc -
> let's call it "word.html"
> Word creates a folder to put all the images in (which it
> names "word_files") I've uploaded the html file, and the
> images folder (to an "/uploads" directory) - and
> everything displays fine on the browser when I enter the
> url: Http://(mydomain)/uploads/word.html .
>
> But I need to INCLUDE the Word.html in another webpage.
> So I'm using php as follows:
>
> <?php
> require($DOCUMENT_ROOT . "uploads/word.html");
>>
>

0 new messages