shenshihai hace 3 años
padre
commit
42945d2640
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/Utility.php

+ 4 - 0
src/Utility.php

@@ -199,6 +199,10 @@ function replaceMacro(string $filePath,string $targetPath,array $macros){
 	foreach($macros as $key=>$value){
 		$content = str_replace($key,$value,$content);
 	}
+	$targetDir = dirname($targetPath);
+	if(!is_dir($targetDir)){
+		createDirectory($targetDir);
+	}
 	return file_put_contents($targetPath,$content);
 }