PHP files are all code. You need a local testing server to view PHP files locally in your browser. Dreamweaver can help you view the code, but you still need a local testing server to preview it.
Get one of these testing servers for you OS and install it.
WAMP for Windows
XAMPP for Windows
http://www.apachefriends.org/en/xampp-windows.html
XAMPP for Mac
http://www.apachefriends.org/en/xampp-macosx.html
MAMP for Mac
http://www.mamp.info/en/downloads/index.html
Setting up a PHP environment in Dreamweaver
http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
Nancy O.