dpkpaxhzffixp8426 2011-04-28 07:08
浏览 36
已采纳

为什么包含&的地址全部打印为&

I have just done the website migration from the old server to the new server. The new server has PHP Version 5.3.2-1ubuntu4.5, and apache2 and etc.

The old site was working perfectly fine, and the new site in the new server works fine except all the urls containing & prints out as &

For example, below line is a snippet of the source code, which should actually print the css file. However, since & has been changed to & , css file does not get called, and site works without the cs file.

<link rel="stylesheet" href="script.php?l=329ef537b34ea622036c008096902d53&amp;t=.css" type="text/css" charset="UTF-8" media="all">

which should be

<link rel="stylesheet" href="script.php?l=329ef537b34ea622036c008096902d53&t=.css" type="text/css" charset="UTF-8" media="all">

and also, below example

<a href="blog/?mid=lacta&amp;act=display">PROFILE</a></li>

should be

<a href="blog/?mid=lacta&act=display">PROFILE</a></li>

What do you think is the reason for causing this? Files has not changed and mysql data has not changed either. I moved everything from old server to new server. What setting in new server do I have to change to correctly print & ?

-----------Updated

For the current server, I am using Apache/2.2.14 (Ubuntu 10.04) and PHP php.ini settings are all default, and Yes I am using rewrite module...

Old server was using Apache/1.3.36 and PHP 5.1.4..

Domain name, .htaccess files, all other files are same.

  • 写回答

2条回答 默认 最新

  • dqwh1219 2011-04-28 07:15
    关注

    URIs should contain ampersands as entity encoded values. It's perfectly correct this way.

    See Special Characters in URI attribute values

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?