B
B
bah20162016-07-08 19:38:50
PHP
bah2016, 2016-07-08 19:38:50

How to transfer values ​​of variables from php script to vbs script?

getenv('USERNAME') you need to transfer the values ​​of these functions to the vbs script, in which there is only one function.

Function addinfo(b)
MsgBox p
End Function

As a result, the php code of the page looks like this:
<html>
<head>
<?php
ini_set('date.timezone', 'Europe/Moscow');

$user = getenv('USERNAME');
?>
<script type="text/vbscript">
p = '<?php echo $user;?>';
</script>
<script src="\\192.168.41.128\dbase\vb.vbs>
</head>
<body onload="addinfo(p)">
</html>

Tried to google it, but couldn't find anything. Please help me figure it out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Semenko, 2016-07-08
@abler98

<body onload="addinfo('<?= getenv('USERNAME') ?>')">
    ...
</body>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question