• I am using an include in my plugin index.php file like this:

    include_once(MY_PLUGIN_DIR.'/myfolder/myfile.php');
    This is giving an error though when the plugin is activates:

    C:\myfolder\PHP\wordpress/wp-content/plugins/myplugin/myfolder/myfile.php): failed to open stream: No such file or directory
    But the folder does exist. Of course the forward and backslashes mixed in the path might be the problem but I am not sure if they are or not and if so how this is normally handled?

  • The topic ‘no such file or directory error for include’ is closed to new replies.