I have constructed a website with the following structure:
www (folder)
- project_1 (folder)
- project_2 (folder)
- ...
- drupal (folder)
- ...
- main.php
- index_project_1.php
- index_project_2.php
- ...
(database is PostgreSQL)

In the folder drupal I have copied all the files of drupal 5.x and a webform module.
The main.php is in charge of presenting the webpage, which contains the menu, navigator and content.
The menu and navigator are loaded into main.php by " include("./inc/template_class.inc.php"); "
But when I load the drupal/index.php into content section by using the " include("drupal/index.php"); " it doesn't work! A fail message shows up.
I supposed, it was caused by the wrong directory arrangement. So I changed all the directory statements in every drupal document and all the directory related data in database.
e.g. from " include_once './'. conf_path() .'/settings.php'; " to " include_once 'drupal/'. conf_path() .'/settings.php'; "
But it still doesn't work!!!!!
What should I do to realize my purpose!!!

Comments

barry’s picture

Drupal is a fully independant content management system, it hasn't been designed to be included in other projects.

jaojao’s picture

You mean, I don't have to change the directory statements, but just to use " include("drupal/index.php"); " ??
But it seems something still wrong!!

marcvangend’s picture

No, completely independent means that it is not meant to be included at all. You don't have to write php files with includes; you call Drupal directly. You start with an empty domain, upload that Drupal files and go to www.yourdomain.com/index.php. At first it will redirect you to the installation page, but when that is finished, your website is located at that url. That's it.

jaojao’s picture

I understand what you mean.
What I want is simply to include the drupal into my website. that's all!
And I want to know how?!

marcvangend’s picture

You can't, sorry.
Drupal is not like a Youtube movie you embed in your site. You can't "put some Drupal in your site". It's all or nothing - If you choose Drupal, you start building your site again from scratch. That has many advantages, but it takes time.

lhtown’s picture

You could, however, reasonable have multiple sites. For instance, you could have a drupal.mysite.com and a forum.mysite.com and a myhandcodedhtml.mysite.com. There are use cases for that, but generally it is to be avoided and Drupal is built to try to make that unnecessary.