Get KoolPHP UI with 30% OFF!

Error with kooluploader

Luis
I'm getting this error: Warning: json_encode() expects exactly 1 parameter, 2 given in C:\AppServ\www\MTPS\privado\KoolControls\KoolUploader\kooluploader.php on line 1
My file is the same that your example (please see below the PHP Page and Handle.php, thank you for your support.
PHP Page
<?php
/*
* This file is ready to run as standalone example. However, please do:
* 1. Add tags <html><head><body> to make a complete page
* 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder
*/

$KoolControlsFolder = "KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder
require $KoolControlsFolder."/KoolUploader/kooluploader.php";
require $KoolControlsFolder."/KoolAjax/koolajax.php";

$kul = new KoolUploader("kul");
$kul->scriptFolder = $KoolControlsFolder."/KoolUploader";
$kul->handlePage = "handle.php";
$kul->allowedExtension = "txt,jpg,gif,doc,pdf";
$kul->maxFileSize = 512*1024; //500KB
$kul->progressTracking = true;

$style_select = "default";

if(isset($_POST["style_select"]))
{
$style_select = $_POST["style_select"];
}
$kul->styleFolder=$KoolControlsFolder."/KoolUploader/styles/$style_select";

?>

<form id="form1" method="post">
<?php echo $koolajax->Render();?>
<div style="padding-left:10px;">
Select style:
<select id="style_select" name="style_select" onchange="submit();">
<option value="default" <?php if ($style_select=="default") echo "selected" ?> >Default</option>
<option value="black" <?php if ($style_select=="black") echo "selected" ?> >Black</option>
<option value="hay" <?php if ($style_select=="hay") echo "selected" ?> >Hay</option>
<option value="silver" <?php if ($style_select=="silver") echo "selected" ?> >Silver</option>
<option value="inox" <?php if ($style_select=="inox") echo "selected" ?> >Inox</option>
<option value="office2007" <?php if ($style_select=="office2007") echo "selected" ?> >Office2007</option>
<option value="outlook" <?php if ($style_select=="outlook") echo "selected" ?> >Outlook</option>
<option value="vista" <?php if ($style_select=="vista") echo "selected" ?> >Vista</option>
</select>
</div>

<div style="padding:10px;">
<?php echo $kul->Render();?>
</div>
<div style="padding-top:20px;">
<i>*Note:</i> Please test uploading with *.txt, *.doc, *.pdf, *.jpg, *.gif ( size &lt; 500KB )
</div>

</form>
Handle.php
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");

$KoolControlsFolder = "KoolControls";
require $KoolControlsFolder."/KoolUploader/kooluploader.php";

//Create handle object and edit upload settings.
$kulhandle = new KoolUploadHandler();
$kulhandle->targetFolder = "Files";
//Call the handle function to handle the request from client
echo $kulhandle->handleUpload();
?>
Posted Aug 26, 2015 Kool
David
Hi Luis,
It appears that you have an old version of PHP. Is there any chance for you to upgrade PHP to any version > 5.3, which would solve this warning?
Rgds,
Posted Aug 27, 2015 Kool -
Luis
You were right, that was one of the problems, but now I can select the file, but it doesn't upload it, the directory "Files" ( $column->targetFolder = "Files"; ) exists, any idea?
Posted Aug 27, 2015 Kool
David
Hi Luis,
I think you could add the following line:
$kulhandle->allowedExtension = "txt,jpg,gif,doc,pdf";

It's because the uploader can only check file type on client-side which is easy for any user to mess with using javascript. So the handle page must also check the file type on server for security reason.
Rgds,
Posted Aug 28, 2015 Kool -
Scarlet
G'day, I was in a rut, wanting to book a short getaway but just not having the extra cash. I'd had a run of bad luck on other platforms and was ready to give up on the idea entirely. I stumbled upon https://play-jonny-casino.com and figured, why not one more try? I upped my bet just a bit on a table game, and that's when my luck finally turned around. The site is easy to navigate, and everything worked without a hitch. I managed to book that trip, and it was the reset I needed. If you're looking for a place that feels fair and doesn't overcomplicate things, this might be it.
Posted Nov 27 , edited Nov 27 Kool
Frances
Gestern Abend habe ich beschlossen, mich nach einem anstrengenden Tag zu entspannen und spinmama zu öffnen. Mir hat sofort gefallen, dass die Website einfach und verständlich ist, man kann schnell einen Slot auswählen und mit dem Spiel beginnen. Die Atmosphäre ist spannend: brillante Grafiken, angenehme Sounds und Bonusfunktionen sorgen für ein festliches Gefühl. Ich habe gelacht und mich über jeden Gewinn gefreut, selbst über den kleinsten. SpinMama ist ideal, um für kurze Zeit die Sorgen zu vergessen und sich zu amüsieren.
Posted 6 days ago Kool