Using WP_PLUGIN_DIR for include file

It doesn’t make a lot of sense, to me, to say “these should not be used directly by plugins”. I tend to think you should use an available function over the constant – if an available function exists – which, in your case, does not. I would go ahead and use the WP_PLUGIN_DIR constant.

php include returns 1 as output with other outputs [closed]

First of all, this is not WordPress-specific, and does therefore not belong in WordPress.StackExchange. As it’s so easy to answer, however… include is not a function, but it does return whatever you put in “return” inside the file that’s included. You can use an output buffer to “catch” all output: ob_start(); include TEMPLATEPATH . ‘/apex.php’; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)