The export script itself is very simple, it's just for testing:
<?php
#!c:\xampp\php\ // not sure if this line is of any importance, it seems to make no difference
$datei = fopen("c:\xampp\htdocs\Nuurdwind\index.html","w");
echo fwrite($datei, "Hallo Welt",100);
fclose($datei);
?>
Thanks for starting this thread! Bootstrap Studio executes export scripts in a similar way to how CMD.exe runs them. So you need to make your script run when you type its path in a command prompt and hit enter. For Linux and Mac it's easy - add the #! line at the top and make the script executable. I am not exactly sure what the correct steps for Windows are, but I think it will involve making a batch file that executes the PHP interpreter somehow.
That works fine.
But when I put these lines to the export settings, the error.log file has a message like
"Script C:\xampp\php\php.exe c:\xampp\htdocs\Nuurdwind\export.php couldn't be run"
Why not? There is no further explanation.
A Windows batch file accepts c:\\ and c:\ to specify a rootdirectory while PHP definitely wants c:\\
Set the destination directory in the script file.
Here comes a simple example that calls a php file from within a batch file. As a result index.html is overwritten with the current directory which is the Bootstrap Studio installation directory. This IS NOT the preset Destination Directory(!). So it makes sense to specify the working directory in the script file .
exp1.bat
c:
REM Specify destination directory, this path is ok:
REM cd c:\\xampp\htdocs\Nuurdwind
REM this path is ok too:
REM cd c:\xampp\htdocs\Nuurdwind
REM If the target directory is not specified as shown above
REM the full path for the script file must be provided:
C:\\xampp\php\php.exe c:\\xampp\htdocs\Nuurdwind\exp1.php
exp1.php
<?php
$actdir = getcwd(); // get actual directory
// this path is ok
$txt="c:\\xampp\htdocs\Nuurdwind\index.html";
// this path is NOT ACCEPTED BY PHP
//$txt="c:\xampp\htdocs\Nuurdwind\index.html";
$datei=fopen($txt, "w");
echo fwrite($datei,$actdir,100);
?>
However, I did not find a solution for running a php-file directly, i.e. without the batch file, even though the php-extension has been associated with php.exe.