[wp-hackers] Access files inside a plugin directory?

scribu scribu at gmail.com
Mon Mar 22 23:38:17 UTC 2010


What exactly is this datafile?


On Tue, Mar 23, 2010 at 12:29 AM, Jeff Rose <mirepup at gmail.com> wrote:

> Is it possible to have that data file reside in my plugin directory, so the
> user doesn't have to upload it separately?
>

Sure:

URL: plugins_url('file_name', __FILE__);

PATH: dirname(__FILE__) . '/file_name';



> On my test blog, it's throwing a 404 error with the basic WP .htaccess
> file.
> I have verified the correct path, and even attempting to access the file
> directly throws a 404.
>

Check it's read permissions.


-- 
http://scribu.net


More information about the wp-hackers mailing list