简体   繁体   中英

php error on joomla site

We have two instances running of a joomla hosted site. One is on test server while the other one is on live server.

We are getting one issue where on the test server, site is displaying correctly but not on live server.

We zeroed on one particular line in the page source view, here is the difference of one function from both test as well as live server

test server

<script language="javascript">
$(document).ready(
    function (){
        $(".pikame403").PikaChoose();
    });

</script>

live server

<script language="javascript">
$(document).ready(
    function (){
        $(".pikame<?=$list['id']?>").PikaChoose();
    });

</script>

to me it looks like on the live server, php is not concatinating the id. Any hints/suggestions are welcome. Also it would be nice if someone could indicate where the addins are store their code.

Not all servers allow to use short tags <?= for echoing. On your test server short tags switched on, on production -- switched off, so they don't work.

You can solve your problem in 2 ways:

  1. Switch on short tags on production server.

  2. Do not use short tags (which I strongly recommend). Just change your code <?=$list['id']?> to <?php echo $list['id']; ?> <?php echo $list['id']; ?> .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM