dongnianchou7047 2009-08-29 16:46 采纳率: 0%
浏览 16
已采纳

PHP - 公式不想发布图像

y0 c0derz!

My formula looks like this:

<form method="post" action="index.php?sida=upl" enctype="multipart/form-data" name="myform">

        <input type="file" name="picture" id="picture" class="file_1" />
        <input type="image" name="submit" style="margin-left: 120px;" src="uplbutt.png" />

</form>

And the PHP code for the formula looks like this:

if (array_key_exists('image', $_POST)) 
{
// do something here bla bla
}

But when i click on the image-submit button nothing happens as it is suppose to happen? What could be wrong?

  • 写回答

2条回答 默认 最新

  • doude5860 2009-08-29 16:57
    关注

    Image inputs are sent as (x, y) coordinates, like [name].x and [name].y.

    Since these aren't valid PHP variable names, the points are replaced by underscores, so you need to look for:

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

报告相同问题?

悬赏问题

  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭