hey there
i have a directory inside my wordpress directory for some template application
apacheWWW/wordpress/jtpc
in my application i want the wordpress current user id
i am able to do this in one page but in the other i get an error
this is what i am doing 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' );
the error says
File does not exist: D:/programming/apacheWWW/wordpress/jtpc/ajaxHandlers/wp-admin, referer: http://localhost/wordpress/?page_id=23
what dose he wants with the wp-admin , and why he is looking for it in the wrong directory , its suppose to be under
D:/programming/apacheWWW/wordpress/
its working for one page, (i am uploading file and creating a directory for this user id)
but for the other page i send an ajax request to delete files by user request so i need to id again but there he throws the error
thank you