[wp-hackers] Calling WordPress functions on a non-WordPress page
Sudar Muthu
sudar at sudarmuthu.com
Thu Mar 19 20:06:00 GMT 2009
Ozh,
Thanks for the reply.
I have this code in a file called index.php inside a directory (say test)
If I enter the full url http://mysite.com/test/index.php then I get 200
status code. But if I enter only the folder http://mysite/test/ I get the
page content by with the status code 404.
Do you have any idea why this occurs?
With Regards,
Sudar
http://SudarMuthu.com
http://twitter.com/sudarmuthu
On Fri, Mar 20, 2009 at 1:24 AM, Ozh <ozh at planetozh.com> wrote:
> <?php
> require('./wordpress/wp-blog-header.php');
> get_header();
> echo "Yeah";
> get_footer();
> ?>
>
> works fine with me. I get "200 OK" as a header.
>
>
> On Thu, Mar 19, 2009 at 7:49 PM, Sudar Muthu <sudar at sudarmuthu.com> wrote:
> > Hello all,
> >
> > I want to include the header and footer of my WordPress page on a
> > non-WordPress PHP script residing in the same server on a different
> > directory. I am using the following code on top of my non-WordPress page
> >
> > require("../../wp/wp-blog-header.php");
> >
> > get_header();
> >
> > The above code works fine, but WordPress sends a 404 error code to the
> > browser together with the page content. Can anyone tell me how to prevent
> > it?
> >
> > Also let me know if this is the proper way to do it or is there an
> alternate
> > way to do it.
> >
> > Thanks!
> > With Regards,
> > Sudar
> >
> > http://SudarMuthu.com
> > http://twitter.com/sudarmuthu
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
>
> --
> http://planetOzh.com ~ Blog and WordPress Stuff
> http://FrenchFragFactory.net ~ Daily Quake News
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list