by Pater » Fri Jun 03, 2011 12:26 pm
Hi
Im making a custom PHP+AJAX interface for mediamonkey. The current functionality i'm working on
is having the albumart of the current song shown in the interface.
However: the following won't work:
- Code: Select all
<?php
function createImageFile( $ImageData, $ImageDataLen)
{
$file = $this->objSDB->FileSystem->CreateTextFile("C:\xampp\htdocs\KeldertjeUpload\test.jpg");
$this->objSDB->FileSystem->FileExists( "C:\xampp\htdocs\KeldertjeUpload\upload.php" ) ? print "true" : print "False";
print gettype( $file );
$file->WriteData( $ImageData, $ImageDataLen );
}
?>
it gives me the following output:
- Code: Select all
fileexists: False
gettype: NULL
Fatal error: Call to a member function WriteData() on a non-object in C:\xampp\htdocs\KeldertjeUpload\classes\tools.php on line 19
and the file is not created. I figured it was a permission problem, but i gave the account that runs mediamonkey writing permission for the folder, and it still won't work.
Anyone got an idea whats the problem or how i could get some debugging going?
Hi
Im making a custom PHP+AJAX interface for mediamonkey. The current functionality i'm working on
is having the albumart of the current song shown in the interface.
However: the following won't work:
[code]
<?php
function createImageFile( $ImageData, $ImageDataLen)
{
$file = $this->objSDB->FileSystem->CreateTextFile("C:\xampp\htdocs\KeldertjeUpload\test.jpg");
$this->objSDB->FileSystem->FileExists( "C:\xampp\htdocs\KeldertjeUpload\upload.php" ) ? print "true" : print "False";
print gettype( $file );
$file->WriteData( $ImageData, $ImageDataLen );
}
?>
[/code]
it gives me the following output:
[code]
fileexists: False
gettype: NULL
Fatal error: Call to a member function WriteData() on a non-object in C:\xampp\htdocs\KeldertjeUpload\classes\tools.php on line 19[/code]
and the file is not created. I figured it was a permission problem, but i gave the account that runs mediamonkey writing permission for the folder, and it still won't work.
Anyone got an idea whats the problem or how i could get some debugging going?