1 2014-03-17 11:54:42

Topic: Include Morfy Library in Another PHP File

What is the correct way to include Morfy library in another file inside a plugin. For example, I have this file structure:

→ /plugins/
    → /dashboard/
    → dashboard.php
    → /views/
        → compose.php
        → edit.php

I want to make the library also work in compose.php and edit.php

PS: The separated files are not part of dashboard.php, so they will always executed separately.

XSS Testing

tovic's Website

Re: Include Morfy Library in Another PHP File

it's up to you smile

Monstra Loves You! Give some love back!

Re: Include Morfy Library in Another PHP File

But it was very difficult and uncool. I sometimes have to do this:

require '../../../libraries/Morfy/Morfy.php

or this to check for valid login:


You are logged in.


Works fine so far. it’s just like I said the first time: not cool and not neat.

The full URL path, how to get that without making conflict in the future?

XSS Testing

tovic's Website

Re: Include Morfy Library in Another PHP File

Nevermind. I think I can do something with $_GET for this.

XSS Testing

tovic's Website