views:

133

answers:

2

How can we create new php pages in drupal ?

A: 

This article on PHP Page Snippets at Drupal.org is probably what you're looking to do.

alxp
+1  A: 

I see three options to create new a PHP page in Drupal:

  1. Put some PHP Snippet in a node, as suggested by alxp.
  2. Create a custom module that provides the page. This module implementation of hook_menu will need to define the path and callback function for the page.
  3. Create a standalone .php file that will bootstrap Drupal and do all the rendering by itself. It can use any Drupal function to do its job. This .php file will need to include Drupal's include/bootstrap.php file and invoke drupal_bootstrap.
mongolito404