This topic is locked
[SOLVED]

 Error using $Folder for Image Directory

3/17/2014 12:07:35 PM
PHPRunner General questions
J
jmlphp author

I have an image upload directory off of my document root /file_inbound. In PHPRunner, I have set the upload directory under Edit As - File/Image to be:

$folder = $_SERVER['DOCUMENT_ROOT'] . '/files_inbound'; with the PHP Expression checked. No other image processing is is performed under advance settings.

When uploading a file, I receive a JSON error:
SyntaxError: JSON.parse: unexpected character
when pressing the 'UPLOAD" link to upload the file.

If I uncheck the PHP expression and type in in a directory off of the PHPRunner output directory '/test_image', the upload works fine.
How do I use $folder so that it can point to the correct directory?

J
jmlphp author 3/17/2014

Boy, do I feel dumb...

Just need to check both checkboxes... Absolute path AND PHP expression.
I could have swore I tried all the different combinations before posting. Sorry.