plecostomus
asked on
PHP Set Variable
I am trying to convert one of my shell scripts to php, but not sure how to set a particular variable. Currently, this is what I have in my shell script:
MYSQL="$(which mysql)"
How can I code this in php?
MYSQL="$(which mysql)"
How can I code this in php?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Excellent. Good luck!
ASKER
no objection
ASKER
This was the one that helped:
<?php
$mysql = shell_exec('which mysql');
echo $mysql
?>
<?php
$mysql = shell_exec('which mysql');
echo $mysql
?>
ASKER
Open in new window