If it’s your own site and you have access to the site’s cPanel, FTP, or so on, then navigate to the relevant folder and either open the file in an editor in the browser, or your shell, or download the file and open it locally.
If it’s not a site you have full access to but you do have an admin account for their wordpress install, then I think you can view and edit php files for template files within the wordpress dashboard.
If it’s an open source project (for example, wordpress’ own internal files) then find the repository and either clone it and find the file, or view it through your browser (eg. github).
If none of the above apply and you’re talking about a closed source project on a site you do not own, then you will not be able to access the php scripts. However, if you simply want to know what their output might look like on your own website, the HTML source is always available for you to view (use view source or a web inspector when on the page), and the php is not really relevant to that.
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Back End’ is closed to new topics and replies.