[wp-hackers] require & include question!
Robert Deaton
false.hopes at gmail.com
Thu Nov 11 19:38:25 UTC 2004
The constant ABSPATH in wordpress points to the directory that
wordpress is installed in. So, if you wanted to add the folder in
wp-includes, you could do an include/require call like this:
include(ABSPATH . 'wp-includes/PEAR/' . $filetoinclude);
where $filetoinclude is the name of the file you want to include or
require. Also, if you just wanted to throw them in a subdirectory of
the plugins directory, you could do :
$curpath = dirname(__FILE__).'/';
and then use
require($curpath . 'PEAR/' . $filetoinclude)
On Thu, 11 Nov 2004 19:54:56 +0200, Ammar Ibrahim <ammar at gnuix.com> wrote:
> I'm writing a revolutionary plugin for wordpress, it should eliminate spam.
>
> Now I came across a problem, I need to use a couple of PEAR packages.
> The best Method for me is to add those files that I need to some
> directory that should have all the includes.
>
> now when I try to include any file, it seems that wordpress doesn't set
> the include path. So what's the best way to do it? Where do I put my
> files? (wp-content) or (wp-includes)? How do I configure 'include_path'
> in wordpress
>
> Regards,
> Ammar Ibrahim
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>
--
--Robert Deaton
http://false-hopes.com/
A proud Linux, Firefox, and WordPress user.
Linux is not an operating system, its a way of life.
More information about the hackers
mailing list