开发者

Prevent Dreamweaver from executing PHP scripts on save

开发者 https://www.devze.com 2023-01-21 10:51 出处:网络
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 erro开发者_Go百科neous inserts into the database and I would lik

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 erro开发者_Go百科neous inserts into the database and I would like to disable this option but I don't know how.

Cheers


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

Prevent Dreamweaver from executing PHP scripts on save


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号