Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
586 views
in Technique[技术] by (71.8m points)

javascript - Fatal error: Uncaught ArgumentCountError: Too few arguments to function plugin_dir_path(), 0 passed in https://FILE DIR

i need to include a - plugin functions and classes so i can work on it outside the plugin area for example i have a plugin called pluginA

pluginA DIR ==

    pluginA [ all inside **/plugins/pluginA ]

                      |
                      |
                      |___ class-pluginA.php
pluginA-loader.php____|
                      |____ includes ____ assets ___ images 

i need to includes some function from plugin a to plugin b

pluginB DIR ==

    pluginB [ all inside **/plugins/pluginB ]

                      |
                      |___[SUB-FOLDER] * functions.php
                      |___ class-pluginB.php
pluginB-loader.php____|
                      |____ includes ____ assets ___ images 

how's im trying to do it in PluginB [Functions.php] :: == i want to include a function/class from plugin a to plugin b

input

include_once (WP_PLUGIN_URL . '/pluginA/pluginA-loader.php');

output

Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 

When I Include a plugin bbp-loader.php

also i did ::

input

 echo plugin_dir_path() . '/plugina/functions.php';

output

Uncaught ArgumentCountError: Too few arguments to function plugin_dir_path(), 0 passed

if you have a fix please let me know (:

thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...