Why is require_once echoing entire file contents? [closed]
The class file starts with a short tag [<?
] - if short tags are disabled [which should be default behavior], whole file is considered plain text and thus not parsed.
Just replace it with a full tag - <?php
.
Leading off your confirmation that short tags are disabled, I am guessing you are debugging your script like this?
// dumps everything!require_once('evalmath.php');// dumps nothing??require_once( 'evalmath.php' );
If your testing looks something like that, then the only reason the second form doesn't dump your file is because it doesn't actually include it a second time. require_once.
Just try to enclose the script with <?php
instead of <?
it might be with the servers configuration issue not accepting it.