Call lc from php?

Richard Gaskin ambassador at fourthworld.com
Thu Jan 21 01:14:19 EST 2021


Neville Smythe wrote:

 > Quick question: is it possible to execute a .lc server script from
 > within php (eg from an index.php page)?
 >
 > This other way is documented, but on a cursory perusal I couldn’t see
 > how to do it, and I’ve forgotten more about php than I remember.
 >
 > Maybe using a shell command within the php, but is there a way set up
 > php to automatically recognise .lc? Php.ini??


No recognition needed if you're explicit: you can pass the name of the 
.lc page to the Server engine as a param, e.g.:

    ./livecode-server mycoolscript.lc


And there's also a second way:

make the .lc script executable, and let the shell know what engine is 
needed to run it with a shebang on the top line:

    #!/usr/local/bin/livecode-server

More on that from David Williams in the LC blog:

https://livecode.com/a-livecode-shell/

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list