Is it possible to execute PHP commands directly within a .bat file on Windows without relying on php-cli?
It is not possible to execute PHP commands directly within a .bat file on Windows without relying on php-cli. However, you can create a separate PHP script file and call it from the .bat file using php-cli to execute the PHP commands.
// php_script.php
<?php
echo "Hello, World!";
?>
// batch_file.bat
@echo off
php -f php_script.php
Related questions
-
database connection typographical errors PHP code
-
file_get_contents include loading content
-
PHP mail forms return path