For example I have a simple php script.
write.php
<?
echo "Hello World!";
if( $argv['1'] == 'twotimes' ) {
// call write.php again with 'onetime' param (How ??)
}
echo "Done";
?>
If I run php write.php onetime on console:
It should print Hello World! only once. Print Done in the end.
If I run php write.php twotimes on console:
It should print Hello World! and then call same script again to print another Hello World!. Print Done in the end.
How to achieve this ?
Remember: Calling the same script with different param is my objective.
Thanks
you may use php exec() funcion like this:
but it seems to me, it’s a bad practice.