What's new

Template errors

  • Template public:thread_view: [E_USER_WARNING] Method canViewWhoReplied is not callable on the given object (XF\Entity\Thread) (src/XF/Template/Templater.php:1295)
  • Template :: [E_USER_WARNING] Method canViewBlogs is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
  • Template public:PAGE_CONTAINER: [E_USER_WARNING] Method canViewReports is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
  • Template public:PAGE_CONTAINER: [E_USER_WARNING] Method canViewReports is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
  • Template public:lau_staff_bar: [E_USER_WARNING] Method canUseLau is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
Your Hosting Talk

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How to run a Bash script via PHP and match the output?

Hello guys,

Is anyone here from Php background, I am here for some solution, can you please let me know, How to run a Bash script via PHP and match the output?
 
You do it with exec ie:

$exec = exec('/bin/sh /bin/scripts/myscript.sh ' , $output, $return);

and you can see the output with:

var_dump($output);
 
Hello,

Php has a function called shell_exec which takes a file path as a parameter. You could write the bash command in a file and call the shell_exec method with the path of that file
 

Trending Content

Back
Top