routes:
{
path: ‘/news’,
url: ‘/web/news.php’,
}
when we visit url: www.domain.com/news?id=5
we can use js:
get the query value:5.
but php can not get the value,how can I get the query id?
routes:
{
path: ‘/news’,
url: ‘/web/news.php’,
}
when we visit url: www.domain.com/news?id=5
we can use js:
get the query value:5.
but php can not get the value,how can I get the query id?
Hi @woxiangfy,
Are questioning that how to get query parameter value in php?
If so, then you are in wrong forum.
when I visit: bhlc.allPatient?id=5
F7 just visit:bhlc.allPatient
I want request URL with ?id=5,so I can use php get the query value。
You can get the parameters of your URL through PHP with the following class: http_get ().
Example.
<? php
$ response = http_get ("http://www.example.com/", $ info);
var_dump ($ info);
?>
More details on:
http://php.net/manual/fa/function.http-get.php
Hope this helps. Happy New Year.
Maybe you above don’t understand what I mean. I modified the source code to achieve my needs(add in red box)
This may explain what I need.Thank you
PHP can not get values, because Framework7 sent only “/web/news.php” without any GET variables.
I cat’n find a solution too.
YES! So I wish the author add one set to enable this Function, that I don’t need to modify the original code.
You can try to use Async route in v2 and add query parameters depending on requested route http://framework7.io/docs/routes.html#async-route
i am new to this form. i know this issue has been closed but i think i have a better solution to pass query values to a webserver.
this is how i solved it:
the link is:
/blog/11-2-2018/
the route is:
{
path: ‘/blog/:date’,
templateUrl: ‘./pages/blog.php?date={{this.$route.params.date}}’,
},
and print_r($_GET) in blog.php prints out:
Array ( [date] => 11-2-2018 )
is this what you meant?