PHP block
-
Hello,
i am trying to use something like:<?php $browserlang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $lang = $browserlang[0] . $browserlang[1] . $browserlang[2] . $browserlang[3] . $browserlang[4]; if (($lang=="sk_SK") OR ($lang=="sk-SK")) { header("Location: https://www.example.sk/sk"); } else if (($lang=="en_EN") OR ($lang=="en-EN") OR ($lang=="en_GB") OR ($lang=="en_US") OR ($lang=="en-GB") OR ($lang=="en-US")) { header("Location: https://www.example.sk/en"); } else { header("Location: https://www.example.sk/en"); } ?>in a block but wont work, the php option is highlighted and the code is working if i test with ‘my custom function’ plugin which use php code.
Is there a special syntax i must use for php to be run in AIPro block?
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘PHP block’ is closed to new replies.