include wp-load.php file (in the root of your wordpress installation) in your php script file like so,
require_once("/path/to/wordpress/wp-load.php");
you will have to provide the abspath of the wp-load file,
now you can use all the functions of wordpress in your php script
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…