-
Junior Member
Preview a page with PHP code (Secure Site - PHP data connector)
I am running Windows 7 IIS 7 as my test environment. When I publish to the site everything works GREAT. But as I design a page if I put a connector on the page and try to preview I get the dialog box I have enclosed.
If I open or try open I get the Windows Internet Explore save pop-up and nothing displays.
I a relatively new to NOF and learning fast. It would be great and same me a lot of time if I could get the preview to work. The manual indicates that I should get placeholders for the connector.
Have I configured something wrong.?
-
Senior Member
PHP is a server-side scripting language which means you have to publish to a web server for the code to be properly executed. Your web browser can only interpret HTML and execute some client-side scripts.
When a web server serves up a PHP page, it basically executes the code and outputs HTML which is sent to the browser.
The only way to "preview" locally is to install server software on your computer along with the various components like PHP, SQL, etc. You would publish your page to your local "server" the same way you would publish to a remote server, then direct your browser there. WAMP is fairly popular, but I like MOWES, which you can set up to run off a USB stick if you like.
Often just as easy to create a /test/ directory on your web server and publish there to test things out.
-
Senior Member
Ray, he said he had IIS installed as his test environment. IIS is a web server (although a not very good one). adellis - have you installed PHP onto your server? Have you set the appropriate IIS permissions to run the script (I'm a Unix man so can't help you at all with IIS but somebody here may be running IIS)?
-
Junior Member
I am running PHP on the server and the test server is working Great. My question is if you preview a page from the tabs below in the design view. Is NOF supposed to render the page with placeholders for the PHP objects?
-
Senior Member
I haven't tried but I would doubt it very much. The tabs at the bottom of design view are just for quick layout checks as is the Preview button in the menu bar. To check your page you really need to do a local publish (doesn't take long if you haven't got a multi-thousand page site). For me, this is SOP; I virtually never use Preview in NoF, always a local publish.
-
-
Junior Member
Hi all,
When I include PHP code on my pages (in a text box using the HTML button), and then preview the page either by clicking the preview site or by clicking page preview, all of the PHP code shows up mixed with the other page elements. Also, any parts of the php code that are html show their results. This generally just gives a big mess and thus the Preview modes are not usuable and one has to publish to the website to see what things will look like. Keep in mind that I don't have PHP on my work computer, but only the server of the website.
Is there any work around for this problem.
-
Senior Member
You just answered your own question. Since you don't have PHP installed on your computer, your computer doesn't have the ability to process PHP code and so you just see the raw unprocessed code. You need to either install PHP on your computer or upload your page to a server that already has it... your web host.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules