I am trying to do…
<?php $content = `echo 'h1 happy days' | jade`; ?>
But it does not return anything. Other commands do (for example ls)
I tried adding jade to the path, making a link in /bin which works from the command line, but not from within php.
What am I doing wrong?
Edit:
From command line:
bash-3.2$ pwd
/Users/billy/test/website-clear
bash-3.2$ echo 'h1 happy days' | jade
<h1>happy days</h1>bash-3.2$ which jade
/bin/jade
bash-3.2$
You have two other options that might suit you well:
1. proc_open if you want more degree of control:
2. Using exec:
Make sure that you have jade in path or use the full path to jade executable.