Answer the question
In order to leave comments, you need to log in
Why is the empty result of executing a command from the command line displayed?
Hello! Maybe you can help me? I would appreciate it.
I created a result.php file with the following content:
<?php phpinfo(); ?>. In the browser on the local host, everything is fine.
I execute in the command line c:\Server\data\htdocs\result.php > c:\Server\data\htdocs\result.txt
As a result, result.txt is formed in the specified folder, but it is completely empty. And he needs to give out information. What could be the problem?
Answer the question
In order to leave comments, you need to log in
You need to run through PHP:
php -f c:\Server\data\htdocs\result.php > c:\Server\data\htdocs\result.txt
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question