Loading the Joomla Framework
In the above code we assume that the external php file is located at the website root.
If the external file is located inside a folder in your Joomla installation then you must change this line accordingly:
For example if your file is located inside the folder modules/mod_yourmodule/tmpl/ then the above line should be:
or if the file is located inside the folder components/com_yourcomponent/templates/default/ then the above line should be:
Did this work out for you?
Let us know in the comments below!