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.
Preview php when webserver is running
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/publish.html
http://www.wysiwygwebbuilder.com/preview.html
Frequently Asked Questions about Publishing
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/publish.html
http://www.wysiwygwebbuilder.com/preview.html
Frequently Asked Questions about Publishing
Re: Preview php when webserver is running
Using wwb preview will change index.php to index.html as you have seen.
This is because WWB Preview doesn't know about the localhost and uses a 'temp' folder.
You should preview it by using the url localhost/flowers directly from the browser (i.e. not the wwb preview option).
This is because WWB Preview doesn't know about the localhost and uses a 'temp' folder.
You should preview it by using the url localhost/flowers directly from the browser (i.e. not the wwb preview option).
Re: Preview php when webserver is running
Go to Tools -> Options -> Publish
and uncheck 'Remove PHP code during preview'.
and uncheck 'Remove PHP code during preview'.
Re: Preview php when webserver is running
Thanks Pablo.
Unchecked that option as you instructed.
This solves the problem, and the extension is now displayed in the browser url correctly as .php
and page now displays correctly.
Regards,
Acroboy
Unchecked that option as you instructed.
This solves the problem, and the extension is now displayed in the browser url correctly as .php
and page now displays correctly.
Regards,
Acroboy