Just begun to remake an existing web site for a friend. The pages contain some PHP includes so the filenames end in .php instead of .html
I know this can be handled by adding a line in the .htaccess file and using .html but this slightly compromises security and means that all existing off-site links get broken.
So I began to recreate the site but as soon as I changed the filename from index.html to index.php the “Preview” showed the actual code - handy if you want to see the code but not what I wanted! Also, when I tried to publish, I got a bunch of “overflow” errors.
I have read the Freeway5Reference_HomePrintVersion.pdf manual and can find no mention of this.
Freeway relies on WebKit, the same browser engine that powers Safari,
for its preview mode. Sadly, Safari/WebKit started doing this behavior
when opening local files (like the preview) somewhere around Mac OS
10.2, and despite the fact that I have filed bugs on this with WebKit
and with the Mac OS, there doesn’t seem to be any resolution.
To be fair, it is a larger problem than just WebKit. Previewing PHP
accurately requires a PHP interpreter, which might also require a full
working AMP stack (Apache, MySQL, PHP) in order to show you what a
regular visitor to your server would see. What WebKit used to do is
simply ignore everything inside the PHP delimiter tags <?php ?> and
show you the rest of the HTML as if that PHP code wasn’t there. For
some pages, this is totally accurate, but depending on what your PHP
actually does, it might leave out whole swaths of the page, or show
you multiple content options where only one would ever be shown to a
real visitor.
So it’s not Freeway’s fault at all, and it’s not entirely WebKit’s
fault either – it’s just a design decision made by Apple that causes
you to see something you don’t expect.
Hi Kefala
What I do is use MAMP which will allow you to view the php files directly on your mac without the need to use an external server.
I use it for all my php work and it works very well http://www.mamp.info/en/index.html
even though I use the pro version you can use the free version which is is fine