Results 1 to 2 of 2

Thread: [RESOLVED] Include problems

  1. #1

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Resolved [RESOLVED] Include problems

    I am trying to use an include file...

    php Code:
    1. <?php include('./includes/links.php?current=home'); ?>

    Returns this error

    Code:
    Warning: include(./includes/links.php?current=home) [function.include]: failed to open stream: Invalid argument in C:\xampp\htdocs\ValueTech\index.php on line 25
    Whats happening?

  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Include problems

    Let's remember local files don't take query strings

    Do it like this:

    PHP Code:
    $current "home";
    include(
    './includes/links.php'); 
    I'll assume you was using $_GET['current'], so just replace that with $current.
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width