georgeocrawford
Technical User
Hi,
In my PHP script, I want to call a shell function I have added to /bin. It's called 'aliascheck', and simply checks if a given file is an OS X format alias.
If I type this in the terminal:
the Terminal prints this:
However, in my php script, when I run:
I get no output.
Strange, as I get outputs from other functions.
The end of the shell script reads as follows:
Do I need to modify this to get an output to shell_exec?
Thanks
______________________
George
In my PHP script, I want to call a shell function I have added to /bin. It's called 'aliascheck', and simply checks if a given file is an OS X format alias.
If I type this in the terminal:
Code:
shell>aliascheck /path/to/the/file
the Terminal prints this:
Code:
/path/to/the/file -> /where/the/alias/points/to
However, in my php script, when I run:
Code:
$path = '/path/to/the/file';
$is_alias = shell_exec('aliascheck ' . $path);
echo $is_alias;
I get no output.
Strange, as I get outputs from other functions.
The end of the shell script reads as follows:
Code:
if [ $? -eq 0 ]; then
if [ ! -z "$linksource" ]; then
echo "\"${1}\" -> \"${linksource}\""
fi
fi
Do I need to modify this to get an output to shell_exec?
Thanks
______________________
George