Having read a bit of Borges's poetry, I know that Borges read and admired Spinoza. Having listened to his Harvard lectures about poetry, I know that he had sort of passing acquaintance with some elements of Chinese philosophy. But something tells me that he had one or two philosophers he knew quite well. Who could these be, and how did they influence his fiction?
I have no personal system of philosophy. I never attempt to do that. I am merely a man of letters. In the same way, for example that — well, of course, I shouldn’t perhaps choose this as an example — in the same way that Dante used theology for the purpose of poetry, or Milton used theology for the purposes of his poetry, why shouldn’t I use philosophy, especially idealistic philosophy — philosophy to which I was attracted — for the purposes of writing a tale, of writing a story?
Borges talks about some of his philosophical influences here, including George Berkeley and Arthur Schopenhauer. Wikipedia's (unfortunately rather unsourced) list of influences in its sidebar for Borges includes others, like Emanuel Swedenborg.