Calling a javascript file (.js) via Excel VBA?
305
All the previously suggested approaches sound hacky to me.
For a more reliable solution, embed the Javascript in a COM component via Windows Script Components, and call the Javascript-based COM component as you would any other COM component.
Author by
Markus Freundorfer
Updated on June 04, 2022Comments
-
Markus Freundorfer almost 2 years
I'm new to PHP and trying to include a file in another with the following code:
<?= require_once ('../template/header.phtml')?>
The inclusion works, but it also adds a "1" to the source code. Same happens if I use include() include_once() or require(). Got no results searching the web as well.
-
Sirko over 8 yearsuse
<?
instead of<?=
. -
Markus Freundorfer over 8 years@Sirko then the files won't be included
-
Mark Baker over 8 years
<?=
will echo the result returned by therequire_once()
which will be a Boolean true if successful, and the require() doesn't explicitly return a value or echo anything, so that Boolean true will be displayed as1
-
Mark Baker over 8 yearsUse
<?
as @Sirko said. That will include the file, but not display the boolean true result of therequire
-
bladerz over 8 years@kvothe try with
<?php
- see my answer below
-
-
SANTHOSH.SJ over 3 yearsrequire_once returns true if file is already imported. Also returns true if (echo)ed when file is present