I had no trouble uploading files and storing them in the db, but I am struggling with something simple.
I have a field in a table that represents a filename. I want to store some files on the file system and make
them available to open and view (pdf primarily) from a view form.
In my view I have a link.
array(
'name'=>'reportfile',
'value'=>($model->reportfile !== null)?CHtml::link($model->reportfile, array('/files/'.$model->reportfile)).' ':'n/a',
'type'=>'html',
),
This gives me a view with a link to "http://localhost/q1/index.php?r=files/MyReport.pdf"
when infact I need to just link to /var/www/files/MyReport.pdf
What am I missing?
Thanks in advance for any help, I feel braindead today!