PHP COM DLL配置文件

Right, I'll try and explain this the best I can.

I'm using PHP COM with a DLL which has a separate config file. Looking at the code of the COM DLL, no path is specified for the config file, only a filename. Running through command line with the config file in the same directory is successful, however when running through a webpage, it can't find the config file.

Any ideas?

I would try changing the current working directory:

chdir('somepath/');

http://php.net/manual/en/function.chdir.php

Edit: Failing that, try to see if it is relative to the host process executing your script. For CGI, that's be php-cgi.exe. For a module, it would be whatever your web server is. If that is the case, you can make a link in NTFS to some config within your script if necessary. You might also consider using Process Explorer to try to figure out what file that DLL is trying to open. Although, since you have the source code, you should be able to figure that out by looking at it.