[eluser]E-Finity Internet[/eluser]
Hello,
I'm using a swf uploader (also uploadify) in my project.
When I upload.php in the root of my server site and use the images successfully uploaded.
When I change the URL to a URL within CodeIgninter, then the script is not executed.
for example:
Code:
/ Public_html / upload.php
works
Code:
/ Public_html / application / controllers / album.php
does not work.
The line I use for calling the URL:
DOES NOT WORK
Code:
window.onload = function () (
swfu = new SWFUpload ((
/ / Backend Settings
upload_url "<? = base_url ();?>/ albums / uploads"
WORKS
Code:
window.onload = function () (
swfu = new SWFUpload ((
/ / Backend Settings
upload_url "<? = base_url ();?>/ upload.php"
Apart from the fact that an upload is placed or not, it seems that the URL never arrives.
Part of the controller:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Albums extends Controller
{
function __construct()
{
parent::__construct();
}
function upload()
{
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'].'/uploads/';
$config['allowed_types'] = 'jpg';
$config['max_size'] = '10240';
$this->load->library('upload', $config) // load the upload class
if ( ! $this->upload->do_upload("Filedata"))
{
$this->HandleError("File is not uploaded");
} else {
$file_id = md5($_FILES["Filedata"]["tmp_name"] + rand()*100000);
$_SESSION["file_info"][$file_id] = $imagevariable;
echo "FILEID:" . $file_id; // Return the file id to the script
}
Even the HandleError wil never arrives. Can sombody help me?