Hi all
Hoping for some guidance as to what I am doing wrong.
In my _output I've got:
echo file_get_contents(__DIR__ . '/data.php');
Then in that data.php, HTML + JS works perfectly however if I try do PHP from within the data.php it doesn't appear.
<?php
if (!defined("WHMCS")) {
die("This file cannot be accessed directly");
}
$clientImport = "test";
print "test";
?>
<html>
<head>
</head>
Domain: <input type="text" id="domain"><br><br>
<?echo $clientImport; print "test";?>
<body>
The HTML input box for domain is working, however none of the PHP print outs are working.
Interestingly, though, the first if statement works as it doesn't allow me to browse that data.php file directly. It results in the die error, so working as intended.
Hoping someone can clarify what I'm doing wrong?
Thanks.