1

Topic: extern.php

I'm thrilled with a new punBB install but new to php and struggling to make the following statement...

<?php
include('http://localhost/discuss/extern.php?action=active&show=5');
?>

...work from my index.html front page. Yes, I know I'm an idiot. Any other ideas?

Thanks.

Re: extern.php

It should work, unless you have no threads =/

Re: extern.php

elbekko wrote:

It should work, unless you have no threads =/

Surely not on a .html page? (well, unless the server is set up to parse PHP in html files)

billw:

Assuming your server doesn't have the fancy set-up that I mentioned above, the code you posted would need to be in a .php file, not a .html file. Also, I'm not quite sure if absolute paths work in includes (I dunno, maybe - if you get an error, try changing what you have to a relative path).

Looking for a certain modification for your forum? Please take a look here before posting.

4

Re: extern.php

There are threads. The command works from an url; php and server side includes do nothing, when they don't choke altogether. Most puzzling.

Re: extern.php

True pogenwurst, didn't see that one tongue

Re: extern.php

You can't add URL parameters to a require if you're getting the stuff from the local filesystem (it looks for a file named extern.php?action=active&show=5)

Re: extern.php

Smartys wrote:

You can't add URL parameters to a require if you're getting the stuff from the local filesystem (it looks for a file named extern.php?action=active&show=5)

Works for me, as I did it before on my localhost =/

8 (edited by billw 2006-04-11 08:16)

Re: extern.php

Thank you for the help. This php stuff really betrays my n00b ignorance. Any thoughts were I might turn for a primer?