I have a query that selects information from the database but I can not print the images on the screen, the address of the images folder are in
\192.168.10.129\sapshared\FOTOS\KennedyDB
but the application is running from 192.168.10.134
, here I leave my code:
<html>
<head>
<title>Prueba de PHP</title>
</head>
<body>
<?php
$serverName = "192.168.10.134";
$connectionInfo = array( "Database"=>"**********", "UID"=>"**", "PWD"=>"***");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$sql = "SELECT TOP 200 Itemcode, Itemname, PicturName FROM OITM ";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
echo "<table border = '1' class = 'table0' > \n";
echo "<tr><td>Itemcode</td><td>Itemname</td><td>Picture</td></tr> \n";
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
echo "<tr><td>$row[Itemcode]</td><td>$row[Itemname]</td><td>$row[PicturName] </td></tr> \n";
}
echo "</table> \n";
sqlsrv_free_stmt( $stmt);
?>
</body>
</html>
As it is, in the field picturname
only shows the name of the image eg. image.jpg