een doc bestand omzetten naar html

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Arjan jansen

arjan jansen

12/01/2009 00:09:00
Quote Anchor link
Hallo

Weet iemand of dit mogelijk is
ik heb een map maar word bestanden instaan nu wil ik die op de website weergeven
eigenlijk wil ik dus weten of er een script is die word bestanden zodat hij word weergegeven zonder te downloaden

bijvoorbaat dank

Arjan
 
PHP hulp

PHP hulp

24/04/2024 15:32:22
 
PHP Newbie

PHP Newbie

12/01/2009 00:11:00
 
Arjan jansen

arjan jansen

12/01/2009 00:33:00
Quote Anchor link
Hallo PHP Newbie

bedank voor de informatie

ik heb dit script gedownload maar nu doet hij niks ik weet niet wat ik fout doe weet jij dat misschien

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?
      $wvware
= "/usr/bin/wvWare";
    $wvware_options = "-d";
      
    function
updateword($wordfilename, $htmlfilename) {
        global $wvware, $wvware_options;
        $htmldir = dirname($htmlfilename);
        /* ensure that we get any images into the html directory */
        exec("$wvware $wvware_options $htmldir $wordfilename > $htmlfilename");
        readfile($htmlfilename);
    }

    
    /* What absolute directory are we in on the file system? */
    $basedir = dirname (  getenv ("SCRIPT_FILENAME") );
    
    /* Work relative to this directory */
    $wordfilename = $basedir . "mijndoc" . escapeshellcmd($name) . ".doc";
    
    $htmldir = $basedir . "/";
    $htmlfilename = $htmldir . escapeshellcmd($name) . ".html";
    
    /* Sanity checks */
    if (! file_exists($wordfilename))
        die("Unable to open file $name ($wordfilename). Set URL variable " .
            "?name=xxx to the base filename of the word file (e.g. try " .
            "for try.doc).  Do not include path!  This script should be in " .
            "the wordconv subdirectory to the .doc file.");
    if (! is_dir($htmldir))
        die("Directory $htmldir does not exist.  It must be " .
            "created and readable and writable by your web server.");
    if ((! is_writeable($htmldir)) || (! is_readable($htmldir)))
        die("Directory $htmldir must be readable and writable by your " .
            "web server.");
    if (file_exists($htmlfilename) && (! is_writeable($htmlfilename)))
        die("The html file ($htmlfilename) exists already but is not " .
            "writable by the web server.");
    if (! file_exists($wvware))
        die("The wvWare executable file $wvware cannot be found.  Please " .
            "ensure that the \$wvware variable in the script is pointed " .
            "to your wvware executable.");
    if (! is_executable($wvware))
        die("The wvWare executable file $wvware is not " .
            "executable by the web server process.  Please change the file " .
            "permissions to make it executable.");

    /* Do the work */
    if (file_exists($htmlfilename)) {
        /* Do we need to update the html file? */
        if (filectime($wordfilename) > filectime($htmlfilename))
            updateword($wordfilename, $htmlfilename);
        else readfile ($htmlfilename);
    }

    else  updateword($wordfilename, $htmlfilename);
?>
 
PHP Newbie

PHP Newbie

12/01/2009 01:24:00
 
Arjan jansen

arjan jansen

12/01/2009 10:21:00
Quote Anchor link
Hallo Newbie

Ik krijg geen foutmelding
ik zie helemaal niks hij doet het niet

Arjan
 
PHP Newbie

PHP Newbie

12/01/2009 10:28:00
Quote Anchor link
Je hebt de code uit die link bovenaan je pagina gezet?
 
Arjan jansen

arjan jansen

12/01/2009 22:55:00
Quote Anchor link
hallo Newbie

dat heb ik gedaan
gewoon gecopieerd en geplakt
map aangepast
 
Mitchell

Mitchell

12/01/2009 23:01:00
Quote Anchor link
Je kan ook gewoon op een manier een wysiwyg implanteren op je site en dan gewoon de inhoud van je word bestand daarin plakken. Deze zet het dan meteen om naar html.
 
Arjan jansen

arjan jansen

12/01/2009 23:10:00
Quote Anchor link
Hallo Mitchell

Dat zou kunnen maar ik wil graag gewoon dat mensen een doc bestand uploaden en dat het dan als tekst zichtbaar word

Arjan
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.