HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers84/zuiderbos.nl/vendor/nqxcode/phpmorphy/bin/dev/generate-bat-files.php
#!/usr/bin/env php
<?php
function generate_contents($php_file_path) {
    $php_file_path = basename($php_file_path);
    return "@%PHPRC%/php -f %~pd0\\$php_file_path -- %*" . PHP_EOL;
}

foreach(glob(__DIR__ . '/*.php') as $path) {
    $bat_path = preg_replace('/\\.php$/', '.bat', $path);
    
    file_put_contents($bat_path, generate_contents($path));
}