Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function doing_ajax(){
- return isset($_SERVER['HTTP_X_REQUESTED_WITH'])
- && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest';
- }
- if ( doing_ajax() ){
- // I shall do some logic over here, if the logic is true,
- // then I'll tell the client that the request is success.
- echo '{status:true}';
- exit();
- }
- header( 'location: admin.php?loading=dismiss?callback=admin.php?upload' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement