Announcement

Collapse
No announcement yet.

Php file within another php file?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vtec44
    replied
    Great ideas! Thanks!
    Last edited by Vtec44; Wed 23 Nov '05, 9:15pm.

    Leave a comment:


  • mlx
    replied
    Originally posted by Vtec44
    The idea is to make the Today's Post search link available in a shorter URL version, so my users can go to it directly. It's much more user friendly and easier to memorize.
    Then what about just putting something like this into an .htaccess file in your web-root directory:
    Code:
    RewriteEngine On
    RewriteRule ^today   /forums/search.php?do=getdaily
    That should redirect anyone going to http://www.mydomain.com/today to your getdaily forum search.

    Or put the following into that today.php:
    PHP Code:
    header("Location: http://www.mydomain.com/forums/search.php?do=getdaily"); 

    Leave a comment:


  • Vtec44
    replied
    I gave up the idea of including a php within a php because of the cookie problem. Instead, I'm using html within a php file and use meta tag in addition to javascript, as a fail-proof method, to forward the page instead. That seems to be working out great!

    The idea is to make the Today's Post search link available in a shorter URL version, so my users can go to it directly. It's much more user friendly and easier to memorize.
    Last edited by Vtec44; Wed 23 Nov '05, 9:54am.

    Leave a comment:


  • Vtec44
    replied
    It's called from withing my forum directory. Any suggestions on what routine to include in the today.php file so it will recognize cookies?
    Last edited by Vtec44; Mon 21 Nov '05, 6:32pm.

    Leave a comment:


  • Icheb
    replied
    The cookies probably aren't valid where you are calling today.php . And if your today.php just consists of a line that includes another page, why do you need today.php at all? Seems superfluous to me.

    Leave a comment:


  • Vtec44
    started a topic Php file within another php file?

    Php file within another php file?

    I'm trying to create a today.php, so it will list only the posts within 24hrs. Right now, people on my forum are doing just that by using "http://www.mydomain.com/forums/search.php?do=getdaily". The code I have for today.php file is below. It seems to work, but it doesn't retain the cookie information. So, when people are viewing today.php, it shows the search but only as if the person is a guest, and exclude all the forums availabled for signed in users only. How do I go about to fix this? Keep in mind that I'm not that fluent in PHP at all, thanks!

    Code:
    <?PHP 
    include('http://www.mydomain.com/forums/search.php?do=getdaily');
    ?>
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X