0

I have used a bash file in a php file. (Require/Include) After that when i want to run the bash file, but not want code will be returned. Result is coming at the end. But the unnecessary codes are coming.

<?php
require_once("shapemorph");
ob_start();
$imageFile2 = 'one-car.jpg';
$imageFile1 = 'two-car.jpg';
shell_exec('./shapemorph -d 10 -p 100 -r "73,56 57,68" '.$imageFile2.' '.$imageFile2.' testfy.gif');
ob_end_flush();
exit;
?>

I have used ob_start() for that also. But still the codes are coming.

I do not want the code to be returned.

2
  • 1
    I should work if you insert it right in the bashfile Commented Apr 24, 2019 at 14:19
  • 1
    You could look at this thread too stackoverflow.com/questions/2292847/… Commented Apr 24, 2019 at 14:22

1 Answer 1

1

You can Just return them to /dev/null if your using Linux

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for reply. But this code should work in server. I am unknown about the server configuration.
you could also redirect the output in a file and remove it as last operation of your script like : myscript >> trash.txt
Are you telling in the bash file ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.