1 (edited by zc923 2004-03-07 14:09)

Topic: Php Include Problems

I have a poll script on my site thats seperated into 2 files. select.php and write.php.
When I select.php directly everything works fine.

However, when I:

<? include ('*/poll/select.php') ?> 

*=My webserver.
Because each section of my site is in a diferent sub folder, I get this: "*/News/write.php" not found.

When I add the poll files to the News directory, I get a constant Loop.
Help would be apriciated.

Do, or do not.

Re: Php Include Problems

If I understanding your problem right, you should look how $pun_root works in Pun.

3

Re: Php Include Problems

Uh, this has nothing to do with punbb. This is related to my main page.

Do, or do not.

Re: Php Include Problems

Jansson was correct. The problem is that your poll script doesn't have any idea that you included it from outside the poll directory. To fix this, you will either have to add the poll directory to your PHP include_path or edit the script select.php to include write.php with a correct path.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Php Include Problems

Hmn...
I see.

Makes sence.

Will get back to you as soon as I try.

Do, or do not.