dqs86517 2016-03-03 15:04
浏览 116

通过表单php调用不同的类函数

We are toying about with the Open Source Flamer app. We noticed that they are able to call a function in a separate class located in a different PHP file via a form POST request. Here is an example of how they do it:

<div id="upldate_location_service" class="div_service">
        <form action="process.php/upDetails" method="post">
            <h3>Update location :</h3>
            <div class="form_row">
                <div class="form_label">Session Token *: </div>
                <div class="form_field"><input type="text" name="ent_sess_token" />name= "ent_sess_token"</div>
            </div>
            <div class="form_row">
                <div class="form_label">&nbsp;</div>
                <div class="form_field"><input type="submit" name="ent_submit" value="Submit" /></div>
            </div>
        </form>
    </div>

The function they are trying to access is UpdateLocation in the file Process.php. We have tried to recreate this process but it wont work. We can echo outside of our class, but for some reason we cant access or run any content in our process.php function.

Here is a copy of our process document:

class LegitAPI Extends API{
    public function upDetails($args)
    {      
        echo "Hello World";  
    }
}

Theoretically, when submitting the form on the index page, it should load process.php and then the method upDetails in the LegitAPI Class and display hello world. However, a blank page is instead being displayed.

Any ideas?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向