I’m getting closer…
Issue is exo_needcompanionfile() - I’m including my HTML logo images in the .exe build in a folder called iart
How can I use the exo_needcompanionfile() command correctly to copy my images that are in the iart folder to the users Temp/folder so my HTML pages that are being created there can use the path for the images?
I’m finally able to create a HTML page in the users Temp folder from the php scripts using this code:
<?php
$content = '<html><body>bla bla bla<img src="iart/logo.jpg"></body></html>';
$storagelocation = exo_getglobalvariable('HEPubTempPath', '');
$file = 'test.html';
$filename = $storagelocation."$file";
$fp = fopen($filename,'wb');
if(!$fp)
echo 'Unable to create output file: '.$filename;
fwrite($fp, $content);
fclose($fp);
?>
But I can not copy my logos, etc to the Temp directory…
I have this as my exo_needcompanionfile call for one of the logos:
exo_needcompanionfile ('iart\\logo.jpg', '', '');
I have read the HELP for this function extensively, but a real world example would be greatly appreciated:
exo_needcompanionfile:
Unpacks a companion file to the Internet Explorer cache, so that plug-ins such as the Flash Player can load it.
Especially useful for image, video and other data files that may be required by Flash movies. See the general demonstration for a sample.
Unpacked files are removed when the application closes.
$source is the virtual path to the companion file that should be unpacked.
$destURLincache is optional. If you leave it blank, ExeOutput for PHP automatically creates the destination URL based on the virtual path. For instance, http://heserver/icon1.png
$isvirtual indicates whether the file should be unpacked to memory (true) or the hard disk (false). Of course, the size of the file shouldn’t exceed the virtual storage’s capacity defined in ExeOutput for PHP.
The function returns the absolute path to the virtual or real file, if successful. Otherwise, a blank value is returned.
Your HELP example is very hard to understand: string exo_needcompanionfile(string $source, string $destURLincache, bool $isvirtual);
Thanks in advance… I’m making progress on this…!!
SysAdm