Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
293 views
in Q2A Core by
I added new directory (api) parallel to qa-include,qa-plugin.  inside api directory i want to call function defined in qa-include,qa-plugin. How it can be possible?

1 Answer

+1 vote
by

Take a look at the External page of the docs. In short you just need to do

<?php
require_once '/PATH/TO/qa-include/qa-base.php';

Then include any other file you need and call its functions.

by
I included qa-base.php and define a function inside qa-base.php. after that I included other two files from qa-plugin (/qa-plugin/test/a1.php) and same new directory (/test/a1.php). and calling three function from each() not working. if we comment any two other is working. please help me , I am trying from last month..
by
You should keep your own code separate, not add functions to qa-base.php (because you will overwrite it when upgrading). And what exactly is "not working"? Are you getting some errors displayed?

Are you using require_once or include_once to include the files? Make sure you use one of those and not require or include because you might import the same code twice.
...