url rewiting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Redmond

    url rewiting

    I fairly new new to running my own apache server and I think I may have a
    configuration issue.
    I've tried asking in alt.apache.conf iguration but have not had any response
    so I'm hoping someone here can help.

    I've got the apache server running with the php 4 and mysql modules running
    fine, I know this cause I can call php'd html pages. My problem is when I
    try and execute something like :-

    echo("<a href=\"$PHP_SEL F?page=5">PREV</a>");

    when the page is reloaded and I echo out $page, it's never has a value.
    Simon


  • John Downey

    #2
    Re: url rewiting

    Simon Redmond wrote:[color=blue]
    > I fairly new new to running my own apache server and I think I may have a
    > configuration issue.
    > I've tried asking in alt.apache.conf iguration but have not had any response
    > so I'm hoping someone here can help.
    >
    > I've got the apache server running with the php 4 and mysql modules running
    > fine, I know this cause I can call php'd html pages. My problem is when I
    > try and execute something like :-
    >
    > echo("<a href=\"$PHP_SEL F?page=5">PREV</a>");
    >
    > when the page is reloaded and I echo out $page, it's never has a value.
    > Simon
    >
    >[/color]
    That would most likely have to do with register_global s being off as of
    version 4.2.0 its off by default and you should use the new superglobal
    arrays to access information as stated on
    http://www.php.net/manual/en/languag...predefined.php. So try
    something like echo $_GET['page']; and I bet it works.

    Comment

    • Raptor

      #3
      Re: url rewiting

      John Downey wrote:[color=blue]
      > Simon Redmond wrote:
      >[color=green]
      >> I fairly new new to running my own apache server and I think I may have a
      >> configuration issue.
      >> I've tried asking in alt.apache.conf iguration but have not had any
      >> response
      >> so I'm hoping someone here can help.
      >>
      >> I've got the apache server running with the php 4 and mysql modules
      >> running
      >> fine, I know this cause I can call php'd html pages. My problem is when I
      >> try and execute something like :-
      >>
      >> echo("<a href=\"$PHP_SEL F?page=5">PREV</a>");[/color][/color]

      It seems to me this technique would also work for my problem ("One
      script, multiple transactions"). Correct? Clever stuff; there's a lot
      of room for programmer creativity in web programming.

      --
      --
      Lynn Wallace http://www.xmission.com/~lawall
      "I'm not proud. We really haven't done everything we could to protect
      our customers. Our products just aren't engineered for security."
      --Microsoft VP in charge of Windows OS Development, Brian Valentine.

      Comment

      • Matty

        #4
        Re: url rewiting

        Raptor wrote:
        [color=blue]
        > It seems to me this technique would also work for my problem ("One
        > script, multiple transactions"). Correct? Clever stuff; there's a lot
        > of room for programmer creativity in web programming.
        >[/color]

        Well, yes, I have a site with just about every single page being generated
        by the same PHP script, which allows you to do common tasks all in the
        same place, etc.

        Comment

        • John Downey

          #5
          Re: url rewiting

          Matty wrote:
          [color=blue]
          > Raptor wrote:
          >
          >[color=green]
          >>It seems to me this technique would also work for my problem ("One
          >>script, multiple transactions"). Correct? Clever stuff; there's a lot
          >>of room for programmer creativity in web programming.
          >>[/color]
          >
          >
          > Well, yes, I have a site with just about every single page being generated
          > by the same PHP script, which allows you to do common tasks all in the
          > same place, etc.[/color]
          Most sites I build like my Sage engine (shameless self ad because its
          currently in idle development) run off the idea of modules. Where the
          index.php interfaces with multiple classes that act independently of
          each other.

          --
          John Downey




          Comment

          • Matty

            #6
            Re: url rewiting

            John Downey wrote:

            [color=blue][color=green]
            >> Well, yes, I have a site with just about every single page being
            >> generated by the same PHP script, which allows you to do common tasks all
            >> in the same place, etc.[/color]
            > Most sites I build like my Sage engine (shameless self ad because its
            > currently in idle development) run off the idea of modules. Where the
            > index.php interfaces with multiple classes that act independently of
            > each other.
            >[/color]

            Yeah, phpnuke, etc, use a similar system, and i think phpfusebox does to
            some extent too - it's a lot better than having twenty different callable
            php files, which one way or anopther have to include the same files, do
            the same work, etc

            Also makes updating the site easier

            Comment

            Working...