private function SaveProxyFile($ProxyFileName, $Template) { $DirectoryPath = pathinfo($ProxyFileName, PATHINFO_DIRNAME); if (!file_exists($DirectoryPath)) { mkdir($DirectoryPath, 0777, true); } file_put_contents($ProxyFileName, $Template); }