Advertisement
uzumaxy

hashcode.ru/questions/283711/

Dec 26th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. $variable = 'Some value';
  2.  
  3. function process_ajax() {
  4.     GLOBAL $variable;
  5.     //now u can use $variable
  6.     //do something
  7. }
  8.  
  9. if($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
  10.     process_ajax();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement