What can we improve?

Documentation

(Edit)

Translation is in progress...
Not all topics are available at the moment and content links may be broken.

IPS_GetMediaIDByFile

integer IPS_GetMediaIDByFile (string $MediaPath)

Parameters

MediaPath Relative media path as seen from main program path

Returns

ID of the searched media object, otherwise 0

Description

The command returns the ID of the media object with the path MediaPath. If no such object exists, the command returns 0.

This function generates a warning if the file was not found. The @ operator can be used to suppress these messages. The exact functionality of this operator is found in the PHP manual.

Example

$MediaID = @IPS_GetMediaIDByFile("media\\help.png");
if ($MediaID == 0)
    echo "Picture not found!";
else
    echo "The Media ID is: ". $MediaID;
Deutsche Webseite verfügbar
Go to cart
Any questions?