Aside from the usual warnings about using PhP, which I understand and am taking seriously, is there any drawback to using the PhP include() function in the "Body" box of the "Edit Basic page" form?

This is not for users of the site. This is only for me, the creator of the site. No one else will have permission to use PhP code on the site.

The reason I want to do this is as follows: I'm revamping an ASP site into Drupal. I have a page that builds its contents from a large amount of data drawn from a database (which I've imported from Access into MySQL). I'm going to translate the Javascript of the ASP page into PhP to do this in Drupal. But I'm getting tired of working in that little and unintelligent "Body" box in the "Edit Basic page" form. If I just put an include() in that box, then I can work on the PhP code in a file in NotePad++. Then every time I save a change to that file, I can test the effect by just refreshing the page.

Any reason not to work that way?

Thanks for your help.

Comments

drupalshrek’s picture

Sounds OK to me.

Paths are something to be aware of, since in DEV or PROD environment the root will often be different, so beware hard-coding a specific relative path.

drupalshrek