How to use Ubuntu's PHP-doc

1

I run

 sudo apt-get install php-doc

I did not find a man entry, nor "which" entry for the program. There is no "phpdoc" -program in my PATH altough I have /usr/bin in my PATH which apparently should be the location of the installed program.

How can you use the program in terminal?

Léo Léopold Hertz 준영

Posted 2009-10-26T01:51:46.633

Reputation: 4 828

Answers

2

The php-doc package just contains documentation for the core PHP functions, from http://php.org/documentation/ - no programs.

firefox /usr/share/doc/php/index.html &

...and this is how you use it.

(If you were trying to install phpDocumentor instead, other answers already have instructions.)

user1686

Posted 2009-10-26T01:51:46.633

Reputation: 283 655

1Ubuntu Precise (12.04) also uses this path. – Samus_ – 2012-11-29T01:10:45.830

I do not have the file which you open in Firefox. How did you obtain the file? – Léo Léopold Hertz 준영 – 2009-10-26T15:50:23.883

1Eh, it seems Debian's package uses /usr/share/doc/php-doc/html/ instead, try that. – user1686 – 2009-10-27T10:51:13.490

1

Checkout this stackoverflow question.

There is also an overview of how to run phpdoc on the comandline as part of a larger tutorial.

Also, try the README - you may need to build it from source.

DaveParillo

Posted 2009-10-26T01:51:46.633

Reputation: 13 402

1

You haven't installed phpdoc as in phpdoc.org

You just installed some PHP documentation.

This is from the description: "This package provides the documentation for the PHP scripting language."

Jacob

Posted 2009-10-26T01:51:46.633

Reputation:

1

You need to install the php5-cli package:

sudo apt-get install php5-cli

Then you can run php from the terminal using: php filename.php

john

Posted 2009-10-26T01:51:46.633

Reputation: