I have a directory inside my wordpress directory for some template application
apacheWWW/wordpress/jtpc
In my application, I want wordpress current user id
I can do this on one page, but in another I get an error
This is what I do to get the user id:
require_once( '/../../wp-load.php' );
global $current_user;
get_currentuserinfo();
$user_id = $current_user->ID;
but I get an error on this line
require_once( '/../../wp-load.php' );
Error says
File does not exist: D:/programming/apacheWWW/wordpress/jtpc/ajaxHandlers/wp-admin, referrer: http://localhost/wordpress/?page_id=23
what dose does he want with wp-admin, and why is he looking for it in the wrong directory, suppose it is under
D:/programming/apacheWWW/wordpress/
Works on one page (I upload a file and create a directory for this user ID)
but for another page I send an ajax request to delete files at the user's request so I need to specify id again, but there it gives an error