search

Home  >  Q&A  >  body text

php - Could you please take a look at the problems I encountered when implementing the current location of the website? ?

There are quite a lot of descriptions, so please be patient and read them.

Feature List

There are two fields above that you should pay attention to: is_support_query_string and is_link. is_link indicates whether it is a link. is_support_query_string Indicates whether additional query strings are supported.

The code contains the following sentence:

< /p>

The actual effect is:

The link below, Product List, actually has an additional mp_id, which is Product ID. He only needs ma_id, which is activity ID.
< /p>

Then, Edit product this link is needed:

The way I implement the dynamic parameters of the current position is: see if the function point is a link, and if it is a link, then judge it Whether additional query string is supported. If supported, determine whether there is a query string in the current URL. If so, send the query string to the current function point< Append to the link of /code> Query string. In this way, some links in the current location require dynamic parameters.

But the above description also points out a problem. Now there is a Function tree: Activity Management\Meow Meow Shopping\Activity List\Product List\Edit Products, where When I click Edit Product, the page currently displayed is the page of Edit Product, and the link to Edit Product is as follows, including ma_id and mp_id:

Then, the link to product list is:

Attention, product list should not contain mp_id normally, but due to my imperfect solution, such a cheating phenomenon occurred. If I If a filtering function is added to the product list, this will result in the phenomenon that only that product will appear when clicking the Product List in Current Location (bug a! ).

Daniu, how to solve it? ? 3q

为情所困为情所困2811 days ago490

reply all(3)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-16 13:15:50

    I don’t understand, try enclosing the words after the colon, (? . $_SERVER['QUERY_STRING'])

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 13:15:50

    It is not recommended to process parameters and urls in php. Php only needs to accept the parameters, process the data and return it. You can use js to get the parameters in the current url, and piece together the url according to business needs. You can add the parameters during the editing operation, and there is no need to piece together for list display.

    reply
    0
  • 迷茫

    迷茫2017-05-16 13:15:50

    I don’t have the patience to read it, I’m sorry

    reply
    0
  • Cancelreply