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条)

报告相同问题?

悬赏问题

  • ¥33 找熟练码农写段Pyhthon程序
  • ¥100 怎么让数据库字段自动更新
  • ¥15 antv g6 力导向图布局
  • ¥15 quartz框架,No record found for selection of Trigger with key
  • ¥15 锅炉建模+优化算法,遗传算法优化锅炉燃烧模型,ls-svm会搞,后面的智能算法不会
  • ¥20 MATLAB多目标优化问题求解
  • ¥15 windows2003服务器按你VPN教程设置后,本地win10如何连接?
  • ¥15 求一阶微分方程的幂级数
  • ¥15 关于#线性回归#的问题:【统计】回归系数要转化为相关系数才能进行Fisher' Z转化吗(相关搜索:回归模型)
  • ¥100 使用matlab解决含分段变量的优化问题