Quote:
Originally Posted by Davidinh
Hi everyone
i have a php file that contain some variable and i tried to connect them together like a URL (link)
$folder = $folders = $vbulletin->options['folder'];
$subfolder = $folders = $vbulletin->options['subfolder'];
$file = $folders = $vbulletin->options['file'];
$url = $folder/$subfolder/$file;
then i got an error like
Warning: Division by zero in E:\xampp\htdocs\test\test.php on line 184
note: those code on line 184
any help or suggestion will be appreciated
or with those variable how can i put them in my template
{vb:var folder}/{vb:var subfolder}/{vb:var file}
within $templater->register('');
is it correct ?
thanks,
|
If you are going to use your first example you need to enclose your slashes in quotes like so... $url = $folder . '/' . $subfolder . '/' . $file however I'm sure there is a better way of doing this. Maybe reading the folder path and parsing each part out into separate variables depending on what you want to do.