Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I'm trying to access the manual of using the command man (debian).
Using this code:
$out = shell_exec("man"); echo $out;
the output is:
What manual page do you want?
How can I select a page from php code?
man by itself doesn't do anything. You have to tell it which command you want to see the manual for. For example: man cd will show you the man page for the cd command.
man
man cd
cd
For example try: echo "<pre>" . shell_exec("man cd");
echo "<pre>" . shell_exec("man cd");
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.