Juan Posted May 7, 2017 Report Posted May 7, 2017 (edited) Hi all, grettings from Spain. I´m customizing a VA with phpVMS and I´m having some problems showing VA STATS on Home page which it is not made with phpVMS. DB is pointing to a subdomain where phpVMS CrewCenter is allocated. Can I call this DB to html home? I need some lines as TotalHours, TotalFlights etc...like shown at ADMIN side on Dashboard. Thanks in advance. Juan Edited May 14, 2017 by Juan Quote
Moderators servetas Posted May 8, 2017 Moderators Report Posted May 8, 2017 You can call the phpVMS functions from your HTML homepage. Just add the code below: <?php include './core/codon.config.php'; ?> and after that, you can call add the phpVMS functions you need. For example: <?php include './core/codon.config.php'; $totalHours = StatsData::TotalHours(); echo $totalHours; ?> Bare in mind that the include should include the relative path of your phpVMS codon.config.php file. Quote
Juan Posted May 8, 2017 Author Report Posted May 8, 2017 (edited) I will test your code Servetas. I'll tell you. Thanx Edited May 8, 2017 by Juan Quote
Juan Posted May 8, 2017 Author Report Posted May 8, 2017 I will test your Core Servetas. I'll tell you. Thanx Quote
Juan Posted May 8, 2017 Author Report Posted May 8, 2017 6 hours ago, servetas said: You can call the phpVMS functions from your HTML homepage. Just add the code below: <?php include './core/codon.config.php'; ?> and after that, you can call add the phpVMS functions you need. For example: <?php include './core/codon.config.php'; $totalHours = StatsData::TotalHours(); echo $totalHours; ?> Bare in mind that the include should include the relative path of your phpVMS codon.config.php file. Hi servetas, I have tried your code but doen´t work . I think that I can´t use a relative path because codon.config.php is in subdomain at phpVMS crew.center installation. Is possible? Can I use a absolute path? THX Quote
Juan Posted May 14, 2017 Author Report Posted May 14, 2017 (edited) On 2017-5-8 at 9:54 AM, servetas said: Hi servetas. My stats aready works at Home Web. I used this include code on top : <?php include("./../../crew.domain.com/core/codon.config.php"); ?> Using relive path but with this dots. An this other to call function: <?php $totalHours = StatsData::TotalHours(); ?> <?php echo $totalHours;?> I have change from index.html to index.php and the server settings to call .php files as "index" All stats works fine. Thanks by your help. Best regards Edited May 14, 2017 by Juan Quote
Waters10 Posted April 3, 2018 Report Posted April 3, 2018 On 14/05/2017 at 4:13 PM, Juan said: Hi servetas. My stats aready works at Home Web. I used this include code on top : <?php include("./../../crew.domain.com/core/codon.config.php"); ?> Using relive path but with this dots. An this other to call function: <?php $totalHours = StatsData::TotalHours(); ?> <?php echo $totalHours;?> I have change from index.html to index.php and the server settings to call .php files as "index" All stats works fine. Thanks by your help. Best regards I seem to have ran into a problem using this method. I've included the code on top, and I can confirm it works as I've managed to iFrame the live map. However, when attempting to call the phpVMS functions, any content below that line disappears and the stats don't show. It's probably something small that I'm missing. Any ideas? Thanks Quote
Waters10 Posted April 4, 2018 Report Posted April 4, 2018 Update: I didn't have the top line correct and was receiving errors from my error_log all along. However, with that now fixed, I get the following error where the call function is placed: Fatal error: Class 'StatsData' not found in /home/mydomain/public_html/v1/test.php on line 209 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.