JS based on PHP generated by the JS variable a=1 represents a certain kind of action permissions, so safe?
such as Ajax request backstage some kind of action, get PHP generated by the JS variable var permission=1;
Then the foreground JS according to
JSON uses the PHP array to the JS array, JS How to receive the PHP array, jsonjs
First download the following file (this is a piece of code that someone else has written that specifically parses the JSON) and then introduce this
Php obtains the php server variable in the current url path.
Programming in php to obtain the current url address and server variables mainly uses the following global variables: $ _ server ["query_string"], $ _ server ["request_uri"], $ _
How does the ZF framework assign an array allocated on the php page to a JS variable on the template page? Allocate variables on the controller page: $ this-& gt; view-& gt; request $ request; $ request is an array. how can I assign this $ request
Twig Use JS variable method, twig use JS variable
In this paper, we describe the method of using JS variable in twig. Share to everyone for your reference, as follows:
Look at a piece of code first
The address of this AJAX request is not properly
Recently in the study Discuz, which modifies the code when you want to assign JS value to the Discuz global variables, there is a great God know how to do? Or the PHP method to get the value of JS can also
Reply to discussion (solution)
PHP
Turn from: http://www.cnblogs.com/kuyuecs/archive/2012/07/18/2597068.html
1 JS way to call PHP file and get the value in PHP
Give a simple example to illustrate:
As in the page a.html, use the following sentence:
There is a section of PHP
Php has a way to get the js value. recently I am studying discuz. when I modify the code, I want to assign the js value to the global variable of discuz. how can I do this? Or you can use php to obtain the js value.
Reply to discussion
First download the following file (this is a piece of code that someone else has written that specifically parses the JSON) and then introduce this file!
Http://pan.baidu.com/s/1dD8qVr7
Now when we need to use Ajax to interact with the background,
First download the following file (this is a piece of code that someone else wrote to parse the JSON) and introduce the file!
Http://pan.baidu.com/s/1dD8qVr7
Now when we need to use Ajax to interact with the background, how to transfer the PHP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.