0

I have a working plugin with many functions in it. I want to break the plugin into several file. I removed some functions and place it in a file called activate.php k7Course.php. Then in the file k7Couses.php i include as below:

/*
Plugin Name: k7 Course Management
Plugin URI: http://yourdomain.com/
Description: A plugin to manage k7 Courses Display
Version: 1.0
Author: Noor
Author URI: http://yourdomain.com
License: GPL
*/

require_once('activate.php');

The problem is that the code in activate.php in being included but as raw text because i see all the content of activate.php in the admin menu. Also the function are not being executed

2

It sounds as though your include file activate.php does not have the opening/closing php tags. Be sure to open activate.php and ensure it has the <?php at the beginning of the file, and the ?> at the end.

  • you were, I just took the functions and paste it there, stupid error :( – Noor Apr 19 '12 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.