Skip to main content
Participant
February 19, 2018
Answered

Device Preview in PHP using includes?

  • February 19, 2018
  • 1 reply
  • 893 views

I'm loving the Device Preview option, but I'm a bit stuck trying to figure out if it's possible to set it up using includes.

For instance, let's say that I load everything from index.php, which has "include($_GET['page'].'.php')" - so while I'm working on the index file, I can see the homepage just fine, but let's say in case of "index.php?page=contact" - I would need to edit the contact.php file, however, when I open that file, it wouldn't load through the index, it "thinks" it's own page... which makes sense, but is there any way to set it up so that I can open contact.php in Dreamweaver and see "index.php?page=contact" in the device preview?

This topic has been closed for replies.
Correct answer BenPleysier

You can't because Real-time Preview runs inside a shell. The only way to see your page is by right-clicking on the page -> This Frame -> Open Frame in New .. as in the following and then entering the URL parameters.

1 reply

Nancy OShea
Community Expert
Community Expert
February 19, 2018

Do you have a local testing server?

Nancy O'Shea— Product User & Community Expert
Participating Frequently
February 19, 2018

Yes, I do. That's what I mean. index.php will load fine, and when I go to contact.php, it also shows me contexts of that php file, but I'm hoping to figure out a way to load index.php?page=cotact when I'm editing contact.php.

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
February 20, 2018

You can't because Real-time Preview runs inside a shell. The only way to see your page is by right-clicking on the page -> This Frame -> Open Frame in New .. as in the following and then entering the URL parameters.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!