Solved

Non-abstract Method must contain body

Posted on 2009-04-07
3
2,072 Views
Last Modified: 2013-11-10
Hello,

Im receiving a PHP error - Note I am using the code igniter frame work.

Non-abstract method Dealer_model::on_screen() must contain body in W:\www\s\system\application\models\dealer_model.php on line 84

I cant figure out what body is for this non-abstract method; please see method below.

Thank you

#--------------------------------------------------------------------------
# METHOD: On-screen display of array contents
#--------------------------------------------------------------------------
    function on_screen($var);
    {
        // on-screen display
        print ('<xmp>');
        print_r($var);
        print ('</xmp>');
        return;
    }

Open in new window

0
Comment
Question by:vrmetro
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
twocandles earned 500 total points
ID: 24090018
You have an extra ';' after the function definition, and php is assuming it's an abstract method. Just remove it.
0
 

Author Closing Comment

by:vrmetro
ID: 31567632
Nice!  Thanks
0
 
LVL 6

Expert Comment

by:twocandles
ID: 24094734
Glad to help and thanks for the points! :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question