views:

25

answers:

2

I am running Dreamweaver CS5. For some reason, when I 'save' my PHP script it tries to run it on the server. This is causing a lot of erroneous inserts into the database and I would like to disable this option but I don't know how.

Cheers

A: 

Maybe it's "Découvrir les fichiers à association dynamique" (Discover files dynamic association ?), ensure it is on "Manuellement" (manually) or "Désactivé" (off).

alt text

MatTheCat
thanks for the reply - could you direct me to which menu to find this option? I cant find it anywhere
Nick Barrett
Edition -> Preferences -> General tab
MatTheCat
A: 

Are you using Dreamweaver's Live View? If so, then do display the page, the page is run through the server (at least in PHP pages, html pages are run locally I believe). So if your page does inserts on load, then when the page refreshes in Live View, it is executed again on the server, therefore inserts are performed.

How to get around this of course this depends on what your specific code does. You could stop using Live View, or perhaps add a "$designMode" flag that prevents inserts being added when you're testing/updating the page. However this could be an issue if you forget to change the flag back to the live setting.

But you could also check the logic of the page and make sure that you only do the inserts on a user action such as submitting a form to the same page (or from another page), not on page load of the page you're working on.

If you're not doing inserts on page load, then you'll need to share some code in order to try to narrow down the issue.

Danilo Celic
Thanks, both your answers have been helpful
Nick Barrett