Uncalled file containing chdir() causing error
In my php project, pdf is generated in a call to a fpdf extended file and xls is generated by a phpxls library dependent file. I have called chdir("libs/phpxls"); inside the xls generator file. 
When pdf generator file is called(which has nothing to do with xls generator or its libs), an error is shown due to the chdir("libs/phpxls"); called in the xls generator. 
I haven't called the xls generator file anywhere knowingly or unknowingly. 
Does anyone know what is going on..?

The getcwd(); method returns the current directory as inside "/libs/phpxls" as if its calling the xls generator even if I or any of the libs aren't calling it directly or indirectly.

Is all the files chdir,include,require methods called by the php interpreter by itself..?

The problem ges solved after I changed the base directory to the real one using chdir(../..)

But I don't have any idea why is the file even called when its not meant to be..?
Uncalled file containing chdir() causing error
===

In my php project, pdf is generated in a call to a fpdf extended file and xls is generated by a phpxls library dependent file. I have called chdir("libs/phpxls"); inside the xls generator file. 
When pdf generator file is called(which has nothing to do with xls generator or its libs), an error is shown due to the chdir("libs/phpxls"); called in the xls generator. 
I haven't called the xls generator file anywhere knowingly or unknowingly. 
Does anyone know what is going on..?

The getcwd(); method returns the current directory as inside "/libs/phpxls" as if its calling the xls generator even if I or any of the libs aren't calling it directly or indirectly.

Is all the files chdir,include,require methods called by the php interpreter by itself..?

The problem ges solved after I changed the base directory to the real one using chdir(../..)

But I don't have any idea why is the file even called when its not meant to be..?