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 | <?php
// set where you want to store the uploaded files
// in this example we keep file in folder tmpUpload
$tmpFldr = realpath("./tmpUpload");
if (!empty($_FILES['myFile']['name'])) {
$DC = New COM("Neevia.docConverter");
$docID = $DC->GUID;
$path = $tmpFldr ."\\". $docID . $DC->getExtensionName( $_FILES['myFile']['name'] );
print $path;
if (move_uploaded_file($_FILES['myFile']['tmp_name'], $path))
{
$DC->setParameter("DocumentOutputFolder", realpath(".") );
$rVal = $DC->submitFile( $path, "" );
$DC->fileDelete( $path );
if ($rVal != 0 ) {
header("Location: error.php");
}else{
header("Location: checkStatus.php?docID=" . $docID . $DC->getExtensionName($path));
}
}
}
?>
<HTML>
<HEAD>
<TITLE>Neevia Document Converter Pro sample file</TITLE>
</HEAD>
<BODY><CENTER>
<FORM action="main.php" method="post" enctype="multipart/form-data">
Select File: <INPUT type="file" name="myFile"><BR>
<INPUT type="submit" name="submit" value="Convert">
</FORM>
</BODY>
</HTML>
|