Link to home
Start Free TrialLog in
Avatar of htgits
htgits

asked on

fopen and the working directory

I'm trying to open a text file using the fopen("file name"", "r"),  however I'm getting an error to the effect that the file can't be found.

On my local IIS server, where the fopen command works file, if I execute getcwd() it returns the current IIS directory. However, on my webserver thie returns c:\windows\system32\inetsrv. How can I force the PHP fopen to look in the same directory as the PHP script which is executing the fopen command?

Any help would be much appreciated

PAulC.
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial