We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,991 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

PHP cannot read pptx/docx/xlsx

Dear experties,
I have a problem with read file in format "pptx/docx/xlsx".
In other format PHP can read the document properly..what can I do for this case?
anybody can help me??
here my script for view the file by hyperlink..

<a href="../folder/upload/<?php echo $row['fileName']; ?>"><?php echo $row['fileName']; ?></a>
2
Contributors
6
Replies
1 Day
Discussion Span
10 Months Ago
Last Updated
7
Views
HasNor
Junior Poster
101 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Is the problem that the browser can not open the files with the above extensions? If that is the case you probably do not have the appropriate program to open the files (up to date MS Office version, viewer apps or LibreOffice) or browser component. What is actually the error you get?

broj1
Nearly a Posting Virtuoso
1,211 posts since Jan 2011
Reputation Points: 167
Solved Threads: 164
Skill Endorsements: 13

Thanks for reply Mr broj1.. seem like that.. my program cannot open Office 2007 file.. the other format no problem..can open by click the link..so how can I solve this problem?

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Please try the following:

Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.

HasNor
Junior Poster
101 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

For example file in .xlsx in database the file type become "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" I think it is the correct file type for .xlsx
But my program still cannot browse this file.. hurm.. :(

HasNor
Junior Poster
101 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

The above error has nothing to do with the office. It says that the file is not on the server. So the first thing you have to check is whether the link is correct.

If you want to open Office 2007 files and have Office 2003 then you can download Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint at http://office.microsoft.com/en-us/support/microsoft-office-compatibility-pack-for-word-excel-and-powerpoint-HA010168676.aspx

If you do not have Office 2003 then use LibreOffice or free MS viewers (I think they are available on web).

broj1
Nearly a Posting Virtuoso
1,211 posts since Jan 2011
Reputation Points: 167
Solved Threads: 164
Skill Endorsements: 13

Sorry Mr broj1, I don't understand it at all.. can you explain more?? I had checked that file already in the server, when I want to open it I need to download first, by this way I only can open the file. It's happen for Mc Office 2007 only.. For the others format I can just click the link then system will open the file directly..I think the link already correct because I just list all the uploaded file and create the hyperlink..I already have Mic Office 2007..hurmm..please help me..

HasNor
Junior Poster
101 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Is this hapening in IE7 or IE8? Then maybe this link can help:

http://support.microsoft.com/kb/927009

broj1
Nearly a Posting Virtuoso
1,211 posts since Jan 2011
Reputation Points: 167
Solved Threads: 164
Skill Endorsements: 13

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0787 seconds using 2.69MB