Preview php when webserver is running
Posted: Sat Mar 28, 2020 8:52 am
I have read this statement: "You cannot preview pages with PHP in your browser. They can only be viewed on a webserver with PHP installed."
However I have a webserver running and can preview pages with localhost with the correct browser url.
My computer is:
running php server
localhost directory is c:\websites
Wysiwyg settings:
Page property file extension php
Preview folder http://localhost/flowers
Publish to: My Computer
URL: http://localhost/flowers
Host: C:\Websites\flowers
Folder: C:\Websites\flowers
The page used is index.php
Publishing the index.php page is done correctly to the Host directory as index.php
Preview displays url in browser -> localhost/flowers/index.html This url does not have the correct .php extension on the page.
Manually changing the extension in the browser url to .php displays the index.php page correctly.
Is it possible to have the page extension correctly displayed in the preview browser, to accurately reflect the page extension?
If the preview sent the correct page extension .php it would be solved.
However I have a webserver running and can preview pages with localhost with the correct browser url.
My computer is:
running php server
localhost directory is c:\websites
Wysiwyg settings:
Page property file extension php
Preview folder http://localhost/flowers
Publish to: My Computer
URL: http://localhost/flowers
Host: C:\Websites\flowers
Folder: C:\Websites\flowers
The page used is index.php
Publishing the index.php page is done correctly to the Host directory as index.php
Preview displays url in browser -> localhost/flowers/index.html This url does not have the correct .php extension on the page.
Manually changing the extension in the browser url to .php displays the index.php page correctly.
Is it possible to have the page extension correctly displayed in the preview browser, to accurately reflect the page extension?
If the preview sent the correct page extension .php it would be solved.