|
Forum > General SMF Forum
Strange SMF Behaviour when dealing with PHP classes
(1/2) > >>
shuban:
When I try loading a class inside an SMF template, i.e. index.template.php
--- Code: ---include("/to_path_way/somefunction.class.php"); $equations = new phpequations();
$context['equation'] = $equations->solve("x-y=-4 x+z=8 x-y-z=10"); --- End code ---
And I print out $context['equation'], it gives me hundreds of errors, but when I don't use anything SMF related, it works as it should.
What's the trick to getting classes to work with SMF's templates?
SMFHacks:
Whats the error
shuban:
Mostly all
PHP Notice: Undefined variable: ...
The exact same code placed into /example.php works perfectly.
SMFHacks:
both have errors just smf is displaying those errors
shuban:
In /example.php, those errors don't exist.
Would it help to upload the class?
http://naveedurrehman.com/demo/phpequations/?page=demo#output
Navigation
[0] Message Index
[#] Next page |
Please Help!
by SMFHacks
April 17, 2024, 08:04:55 am
|
Rate own images
by fvlog19
April 11, 2024, 10:56:53 am
|
Tidy Child Boards on 2.1.4
by SMFHacks
April 04, 2024, 03:54:12 pm
|
Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header
by Michel68
March 30, 2024, 12:41:08 pm
|
Can't DROP 'id_member'; check that column/key exists Datei:
by SMFHacks
March 30, 2024, 11:58:20 am
|
No thumbnails on new uploads
by Tonyvic
March 29, 2024, 06:26:18 am
|
Display the Contact Page for guests
by SMFHacks
March 27, 2024, 10:55:43 am
|
is it possible to add support for odysee.com
by fvlog19
March 21, 2024, 08:47:51 am
|
Request for admin notification
by davejo
March 10, 2024, 01:31:59 am
|
I need help with torrent upload
by Ineedsmfhelp
March 09, 2024, 10:01:13 pm
|
|
|