我有一个存储在临时文件夹中的文件。 在localhost中,当我运行以下函数时:
$return_res = $documentRetrieved->getPathname();
我回来了:
C:\Windows\Temp\A2C2.tmp
在使用相同代码的实时服务器中,我得到:
/tmp/cdbQpa
当我跑步时
file_get_contents($documentRetrieved->getPathname())
它在localhost中工作正常,但在实时环境中却不行。我该怎么办才能在本地和实时服务器上运行?