I am trying to populate an array with a path to a file.
<?php
session_start(session_id());
$galleryID = $_SESSION['newGalleryId'];
$path_pages = '../../../../data/gallery/' . $galleryID . '/images/album/';
?>
<?php
class UploadHandler
{
protected $options;
function __construct($options=null) {
$this->options = array(
'script_url' => $this->getFullUrl().'/',
'upload_dir' => $path_pages,
'upload_url' => $path_pages,
'param_name' => 'files'
}
?>
I am using the jQuery-file-upload to upload files to a directory. If I hard code the $galleryID in it works fine, but when I try to plug in the $variable it doesn't work. Any ideas why the $galleryID is causing me issues.
Thanks
var_dump($galleryID)and what do you see? Is it the same value as the hard coded one?session_start()withoutsession_id()var_dump($path_pages)and what do you see?var_dump($_SESSION['newGalleryId']);