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>

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?

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.

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.. :(

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).

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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.