Fatal error: Uncaught Error: Class ‘myclassname’ not found
-
Hello Team
Actually I am trying to include the PHP code into above page using the “Insert PHP Code Snippet” plugin. All other includes working properly, but when I am trying to add the following code into same plugin & try to include by PHP code snippets some fatal error is occurs.
Code I am Using in “Insert PHP Code Snippet” plugin –
<?php include_once($_SERVER['DOCUMENT_ROOT'].'/offerbox/curl-xml.php'); $flights = new flightDetails('https://book.emailflights.com/remoteOfferGroup.php?groupid=217&password=xxxxx'); echo '<table class="offerbox-table">'; foreach($flights->getOffers(6) AS $flight){ echo '<tr><td class="offerbox-flightcol"><span class="offerbox-from" style="font-weight:bold;text-transform:uppercase">'.$flight['to'].'</span></td> <td class="offerbox-pricecol"> from <span class="offerbox-price" style="font-weight:bold">'.$flight['price'].'</span> <img height="10" width="10" src="/offerbox/icon-live.gif" alt="live-price" /> </td></tr>';} echo '</table>'; ?>————————————————————–
What error I am getting –
Fatal error: Uncaught Error: Class 'flightDetails' not found in /home/emailh9/public_html/wp-content/plugins/php-code-for-posts/Classes/Shortcode.php(81) : eval()'d code:3 Stack trace: #0 /home/emailh9/public_html/wp-content/plugins/php-code-for-posts/Classes/Shortcode.php(81): eval() #1 /home/emailh9/public_html/wp-content/plugins/php-code-for-posts/Classes/Shortcode.php(38): PhpCodeForPosts_Shortcode::do_shortcode(Object(PhpCodeForPosts_Snippet), Array) #2 /home/emailh9/public_html/wp-includes/shortcodes.php(319): PhpCodeForPosts_Shortcode::handle_shortcode(Array, '', 'php') #3 [internal function]: do_shortcode_tag(Array) #4 /home/emailh9/public_html/wp-includes/shortcodes.php(197): preg_replace_callback('/\\[(\\[?)(php)(?...', 'do_shortcode_ta...', '[php snippet=1]...') #5 /home/emailh9/public_html/wp-includes/class-wp-hook.php(286): do_shortcode('[php snippet=1]...') #6 /home/emailh9/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters('[php snippet=1]...', Array) #7 /home/emailh9/public_html/wp-includes/po in /home/emailh9/public_html/wp-content/plugins/php-code-for-posts/Classes/Shortcode.php(81) : eval()'d code on line 3——————————————————————-
Can you please assist on the same.
Yhank you in advanced.- This topic was modified 6 years, 3 months ago by .
- This topic was modified 6 years, 3 months ago by .
The page I need help with: [log in to see the link]
The topic ‘Fatal error: Uncaught Error: Class ‘myclassname’ not found’ is closed to new replies.