dongyuan7981 2010-03-17 12:24
浏览 15
已采纳

奇怪的网址,以及跟随php页面流程的困难

I'm trying to understand code that I bought so I can modify it.

In the index.php there are picture links:

<a href="test10,10"><img title="" border=1 
src="makethumb.php?pic=product_images/test101.jpg&amp;w=121&amp;sq=N" / ></a>

I don't understand the href since it is not pointing to a page. test10 is an id of a picture. I assumed it was going back to the index.php and the code would extract the test10,10 from the url, but it's not. I know that because I put in trace code as the first line.

The question is, where is the link going to?

I know it that it somewhere in the process it executes a page called profile.php, but nowhere in the source code (doing a global search) is there an explicit call to profile.php.

As a related question, is there a way to profile the code to see what pages it's calling without using xdebug, which for the life of me I can't get working after many hours of trying every suggestion I found here and else where. (I'm using xampp)

The flow is: you enter the site www.site.com/final/index.php. which displays pictures with the link as above. When you click on the picture with an id of test10 it takes you to www.site.com/final/test10,1

thanks

  • 写回答

1条回答 默认 最新

  • douchuanhan8384 2010-03-17 12:27
    关注

    The question is, where is the link going to?

    Under normal circumstances, a request to

    www.yourdomain.com/current_directory/test10,10 
    

    is made.

    Usually, Apache will try to find a file of that name, and fail.

    If the behaviour you get is different, then there is probably a mod_rewrite rule set up somewhere. Look for .htaccess files (note, files in parent directories affect all children) and check the httpd.conf, httpd-vhosts.conf and other log files for any RewriteRule settings.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算