fopen() not functioning properly

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
Chirayu
Forum Newbie
Posts: 1
Joined: Thu May 08, 2008 1:16 am

fopen() not functioning properly

Post by Chirayu »

Hello friends,

I am facing a strange problem within my application.

The application is meant for handling Word and PowerPoint documents. On the page, there is a input field provided where the file path for the document is displayed. If the value in the input field is changed, then the php script will try to determine first whether the document is open or not by opening that document in append mode using fopen(). If the document is open then it will return an error message and restore old path.

Also there is a "View" button provided on the page. When a user clicks on the "View" button, the VBScript will open the Word or PowerPoint document in read-only mode to which the "View" button is linked.

Once the document is opened in read-only mode by clicking the "View" button, if I change the file path for Word document then the php scripts return error message every time I change the file path and restores the old path. However for PowerPoint document, the php script returns error message on for the first time only and in the subsequent try it moves the document, even when it is open in read-only mode.

I am using Windows 2003, IIS 6.0, FastCGI, PHP 5.2.4 and MSSQL Server 2000.

Please help me.

Thanks

Chirayu
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: fopen() not functioning properly

Post by JAB Creations »

Hi Chirayu and welcome to DevNetwork.

You should consider reading the forum titles before you post.

General Forum description...
This forum is not for asking programming related questions.
I'd recommend posting the issue (along with more code if possible) in the PHP Code forum.

I also highly recommend copying the exact error message with the exception of anything proprietary (such as function or variable names so essentially copy only the generic part of the error message), go to Google, paste the error message, and encase it within quotes.

Good luck!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: fopen() not functioning properly

Post by RobertGonzalez »

Moved to PHP - Code.
Post Reply