Open msword file through php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
neerajsingh
Forum Newbie
Posts: 5
Joined: Thu Dec 31, 2009 1:44 am

Open msword file through php

Post by neerajsingh »

Hi friends,

i have upload a msword file(like cv), name is available in database and file is available in uplooad folder, i want to open this file in my page and then edit .

what should i do???
help pls.
manojsemwal1
Forum Contributor
Posts: 217
Joined: Mon Jun 29, 2009 4:13 am
Location: India

Re: Open msword file through php

Post by manojsemwal1 »

use opendir() and read file function
neerajsingh
Forum Newbie
Posts: 5
Joined: Thu Dec 31, 2009 1:44 am

Re: Open msword file through php

Post by neerajsingh »

thanks for reply..

i have use this

$dir = "upload";


if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}

this is display all files available in upload folder. i want to display one file content and edit it.
i m testing this in localhost.
manojsemwal1
Forum Contributor
Posts: 217
Joined: Mon Jun 29, 2009 4:13 am
Location: India

Re: Open msword file through php

Post by manojsemwal1 »

Frist u check the file u want to display is it exit or not ,
then give the file path which u want to be open............
for more detail read this article may be help u
http://webcheatsheet.com/php/working_wi ... s.php#read
neerajsingh
Forum Newbie
Posts: 5
Joined: Thu Dec 31, 2009 1:44 am

Re: Open msword file through php

Post by neerajsingh »

hi,
this code display all file in dropdown. i m working in a job site.
after click on edit or preview it's look like..... see image

Image
manojsemwal1
Forum Contributor
Posts: 217
Joined: Mon Jun 29, 2009 4:13 am
Location: India

Re: Open msword file through php

Post by manojsemwal1 »

NO Image
neerajsingh
Forum Newbie
Posts: 5
Joined: Thu Dec 31, 2009 1:44 am

Re: Open msword file through php

Post by neerajsingh »

hi manoj,

right click and view image.

neeraj
manojsemwal1
Forum Contributor
Posts: 217
Joined: Mon Jun 29, 2009 4:13 am
Location: India

Re: Open msword file through php

Post by manojsemwal1 »

Sorry No Image pl upload again..........
neerajsingh
Forum Newbie
Posts: 5
Joined: Thu Dec 31, 2009 1:44 am

Re: Open msword file through php

Post by neerajsingh »

looks like
Attachments
look.JPG
look.JPG (99.44 KiB) Viewed 293 times
view page
view page
look.JPG (99.44 KiB) Viewed 293 times
Post Reply