Is it possible to do integrate a fully PHP script into AS and perform it with »do shell script«?
E.g.
set myAdd to 5
set myCode to ¬
"
#! /usr/bin/php
<?php
$myVar = \"Hello World\";
$myCounter = 5;
echo $myVar . ($myCounter + " & myAdd & ") . \"\\n\";
?>
"
set myResult to do shell script "/usr/bin/php \"" & myCode & "\"" & return
I’ve tested it, but it doesn’t work, because the shell gets multiple returns and »thinks« that each line is a seperate command line. Is there a way?
Cheers
Tobias
AppleScript: 1.10.7
Browser: Safari 523.12.2
Operating System: Mac OS X (10.4)