You are here: PSPad forum > English discussion forum > Re: View PHP File

Re: View PHP File

#1 View PHP File

Posted by: admirable | Date: 2013-05-17 22:57 | IP: IP Logged

I have a file that is most html with a php name. Until today, I was able to hit F10 to view the php file. Now it is just a blank view with a box that flashed and I don't know if it says anything.

Is there anything I can do so I user the HTML viewer again to see a file with a php extention name?

Options: Reply | Quote | Up ^


#2 Re: View PHP File

Posted by: pspad | Date: 2013-05-18 05:34 | IP: IP Logged

PHP is server side scripting. To view result of PHP, you need to install some local web server and set PSPad in program settings / Internet.
Use Shift+Ctrl+F1 instead of F10 to see result from web server after you will set up it.

Options: Reply | Quote | Up ^


#3 Re: View PHP File

Posted by: admirable | Date: 2013-05-20 02:27 | IP: IP Logged

I had installed xamp and set PSPad in program settings / Internet and it was set to C:\xampp\htdocs.

It used to work and now it does not.

Options: Reply | Quote | Up ^


#4 Re: View PHP File

Posted by: pspad | Date: 2013-05-20 03:59 | IP: IP Logged

Do you save your PHP files to C:\xampp\htdocs ?

Options: Reply | Quote | Up ^


#5 Re: View PHP File

Posted by: admirable | Date: 2013-05-20 23:20 | IP: IP Logged

No, I do not save the files there. Do they need to be saved there?

Options: Reply | Quote | Up ^


#6 Re: View PHP File

Posted by: pspad | Date: 2013-05-21 04:19 | IP: IP Logged

Save your files anywhere you want, but set properly Document root in PSPad settings / Web server.

If your open your files in standard web browser, do you see the result? PSPad does address translation from standard disk address (C:\yyy\zzz) to URL address [url]http://[/url]....

Options: Reply | Quote | Up ^


#7 Re: View PHP File

Posted by: admirable | Date: 2013-05-21 15:09 | IP: IP Logged

Thank you. It does appear my apache is not working right. It is telling me Object not found!

Options: Reply | Quote | Up ^


#8 Re: View PHP File

Posted by: johnbentley | Date: 2015-07-02 09:09 | IP: IP Logged

I can verify that ...

HTML > HTML Preview Web Server (Shift + Ctrl + F10)

... works well to preview your *.php files, with PSPad's internal web browser, when:
* You have a correctly configured Web Server (like Apache); and
* You have a correctly configured PSPad (Settings > Program Settings > Web Server).

With those PSPad settings PSPad can translate the file system path and file name into the relevant URL.

For example with PSPad > Settings > Program Settings > Web Server >
* Server: localhost
* Document Root: C:\MyWebFiles\DocumentRoot\

The translation could go something like
* File System Path and File name:C:\MyWebFiles\DocumentRoot\Php\Examples\helloWorld02.php; to
* Translated URL:http://localhost/Php/Examples/helloWorld02.php

... before loading it into the internal browser.

Is there a way to have PSPad load the translated URL directly into an external browser (Firefox, Chrome, ect)?

I see, for Highlighters Settings, the opportunity to load an External application. I also see that if you right click on the application field you get a list of variables. But I seen no obvious way to use those variables to pick up on the translated URL (from Settings > Web server).

If this is not possible then my post would count as a feature request. And I'd suggest adding this functionality to the "Settings > Web server" section, rather than the Highlighters Settings.

Edited 2 time(s). Last edit at 2015-07-02 09:11 by johnbentley.

Options: Reply | Quote | Up ^


#9 Re: View PHP File

Posted by: pspad | Date: 2015-07-02 10:31 | IP: IP Logged

yes, you can use external application too. use variable %phpfile%

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR