如何加载字preSS环境PHP脚本? [英] How to load the Wordpress environment in a php script?

查看:85
本文介绍了如何加载字preSS环境PHP脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何可以加载字preSS环境在脚本中,这样我就可以使用Word preSS'功能?

How can I load the Wordpress environment in a script, so I can use Wordpress' functions?

我需要这个,因为我需要从中异步执行的脚本调用几个功能。

I need this because I need to call several functions from a script which is executed asynchronously.

推荐答案

您需要加载WP-load.php文件,该文件将允许您调用字preSS功能。

you need to load the wp-load.php file, which will then allow you to call wordpress functions.

例如:

require( '../wordpress/wp-load.php' );

与'字preSS即为您安装根目录。

with 'wordpress' being your install root.

这篇关于如何加载字preSS环境PHP脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆