We have our own php system, now we want to have a blog function. Because wordpress are widely used, so we decided to use it. And now I want to invoke wordpress's function , for example
wp_insert_user , how can I can do that ?
Suppose my system is
A and installed on
/var/www/A, and wordpress is
WP and installed on
/var/www/WP. I can put them together like this
/var/www/A/WP, but I don't think that's a good idea.
If we use
/var/www/WP, how can I invoke wordpress's function from a php file that in project
A? Using curl?
Now I put WP below A (/var/www/A/wordpress)
Here, in my project A , I have a logon.php, what I want to do is invoke 'wp_insert_user' function to create a new wordpress user when user logon our system (just a test purpose).
I put the following code at the beginning of my logon.php
define('WP_USE_THEMES', false); require('/var/www/A/wordpress/wp-blog-header.php');
Before I add the two line, when I visit my site, the url is :
After I add it, the url become this:
what worse, all the style of my logon.php are completely gone.
My requirement is simple:
when user logon our system, invoke wordpress function 'wp_insert_user' to create a user for wordpress. Just to create a new user, no more action.