fopen() not functioning properly
Posted: Thu May 08, 2008 1:21 am
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
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