Hello
I'm using PHP to build a menu of links based on information stored on
database.
There is a table with two fields. One regards the name of the
application (Appname) and the other one the corresponding link (lnk).
My PHP code looks like:
<?php
…
while (odbc_fetch_row($rs))
{
$app=odbc_result($rs,"Appname");
$lnk=odbc_result($rs,"lnk");
echo "<li><a href='$lnk'>$app</a></li>";
}
…
?>
The problem is that $lnk can simply be either a web link or a
reference to an application (.exe), which is server side. In that
case, $lnk is something like:
"C:\Program Files\Common Files\Microsoft
shared\AccessRuntime\Office10\MSACCESS.EXE" /Runtime
"\\PTmacc\wmreports\Macc\Macc.mde" /cmd server=PTmacc, database=macc4
When $lnk is a web link, the application works as I want, but if not,
the application isn't executed. The ‘path' is assumed as a web link
and the browser tries to open it.
Does any PHP function that allows opening applications from a normal
link. I know exec() function but I really don't know if it works as I
wish. Besides I think it's not possible to make something like:
<?php
…
echo "<li><a href='exec('$lnk')'>$app</a></li>";
…
?>
Does anybody who can help me please?
Thanks.
Regards,
Miguel