PHP / MySQL:空白图像路径

时间:2017-04-02 13:57:22

标签: php mysql

请我有一个挑战,我正在尝试使用
从路径“uploads /”中检索图像 <img src="uploads/'.strip_tags($muproff['image']).'" />。它显示空白图像,但如果我放置原始路径,它显示良好。

我正在尝试基于2个参数进行选择,其中发送者和接收者实际上与存储的信息匹配

 $mergeyou = $flash->query("SELECT * FROM `user` WHERE `username` IN
       (
       SELECT `sender`
       FROM `merge`
       WHERE `reciever`='{$prof['username']}')");
       $uwonm = $flash->query("SELECT * FROM `merge` WHERE `reciever`='{$prof['username']}' AND `sender`='{$_POST['sender']}'"); //this is the code for selecting image path from the database table named "merge"
       $muproff = $uwonm->fetch();
       if($mergeyou->rowCount() > 0){
    //Update Paid
    if(isset($_POST['conpay'])){
        $paydon = date('d-M-Y');
        $flash->query("INSERT INTO `donation` (sender,reciever,amount,payedon,status)
        VALUES('{$_POST['sender']}','{$muproff['reciever']}','{$emoney}','{$paydon}','1')");
        $mergsens = date('dmYhi');
        $flash->query("DELETE FROM `merge` WHERE `reciever`='{$prof['username']}' AND `sender`='{$_POST['sender']}'");
        $seemer = $flash->query("SELECT * FROM `merge` WHERE `reciever`='{$prof['username']}' AND `sender`='{$_POST['sender']}'");
        if($seemer->rowCount() < 1 AND $prof['right'] < 1){
        $flash->query("UPDATE `user` SET `tomerge`='100',mergesince='{$mergsens}' WHERE `username`='{$muproff['reciever']}'");
        }
        $flash->query("UPDATE `user` SET `tomerge`='1',mergesince='{$mergsens}' WHERE `username`='{$_POST['sender']}'");
        $updref = $flash->query("SELECT * FROM `user` WHERE `username` IN
        (
        SELECT `referral` FROM `user` WHERE `username`='{$_POST['sender']}' AND `refstat`<1
        )");
        if($updatref = $updref->fetch()){
            $refvbon = ($emoney/10);
            $newrefbonus = ($updatref['refbonus'] + $refvbon);
            if($flash->query("UPDATE `user` SET `refbonus`='{$newrefbonus}' WHERE `username`='{$updatref['username']}' LIMIT 1")){
                $flash->query("UPDATE `user` SET refstat='1' WHERE `username`='{$_POST['sender']}'");
            }
        }
        header('Location: '.$set['url'].'/member/main?pro=success');
        exit;

    }

    //Update Switch
    if(isset($_POST['switch'])){
        $flash->query("UPDATE `user` SET `switched`='1' WHERE `username`='{$_POST['sender']}'");
        $flash->query("DELETE FROM `merge` WHERE `reciever`='{$prof['username']}' AND `sender`='{$_POST['sender']}'");
        $sedu = $flash->query("SELECT * FROM `user` WHERE `plan`='{$prof['plan']}' AND `tomerge`<'1'
        AND `switched`<'1' AND
        `username` NOT IN
        (SELECT `sender` FROM `merge` WHERE id>0)
        AND
        `username` NOT IN
        (SELECT `reciever` FROM `merge` WHERE id>'0')
        AND `username`!='{$_POST['sender']}' LIMIT 1");
        $dtiMx = (time() + 30);
        $flash->query("UPDATE `user` SET `switch`='{$dtiMx}' WHERE `username`='{$prof['username']}'");
        if($sedu->rowCount() > 0){
            $mervg = date('d-m-Y');
            $meTimex  = (time() + (60 * 60 * 24));
            $cedu = $sedu->fetch();
            $flash->query("INSERT INTO `merge`(sender,reciever,mergeon,xtime)
            VALUES('{$cedu['username']}','{$prof['username']}','{$mervg}','{$meTimex}')");
            echo '<div class="success center">Success!</div>';
        }
        else{
    mail($set['email'],'Hello Merge Me Please on "'.$set['name'].'"','Merge Me Manually Please
     my username is '.$prof['username'].' i just delete my merge which is '.$_POST['sender'].'
     Who fail to send my money please merge another person to me Thanks!','merge@'.$set['slug']);
            echo '<div class="info">No User Available which you can be Merge with wait for some momment for Admin to Help you!</div>';
        }
        header('Location: '.$set['url'].'/member/main?pro=success');
        exit;
    }
    //End Switch
    echo '<div class="container center">
    <div class="x center"><div class="xx center"><div class="center xxx">';
    echo '<div id="content">
                <div class="container center">';
    while($muprof = $mergeyou->fetch() OR $muproff = $uwonm->fetch()){
                    echo '<div class="row">
                        <div class="col-md-5">
                            <div class="box center">
                            <div style="width:97%;" class="center">

    <div class="panel panel-primary">
    <div class="panel-heading">
    <h3 class="panel-title"><strong>MATCHED TO PAY YOU</h3></div>';
    echo '<br><b>

    <h3 style="">AMOUNT: <span>₦ '.$emoney.'</span></h4>
    <h4 style="">Receive From: <span>'.htmlspecialchars($muprof['firstname']).' '.htmlspecialchars($muprof['lastname']).' </span></h4>
    <h4 style="">Phone Number: <span>'.htmlspecialchars($muprof['phone']).'</span></h4></b>
     <img src="uploads/uploads/'.$muproff['image'].'" /> '; // This is the code I put up to render the image, it is not displaying.

    echo '<form method="POST">
     <input type="hidden" name="sender" value="'.htmlspecialchars($muprof['username']).'"/>
    <button class="button button-xlarge button-rounded" data-toggle="modal" data-target=".modal-payment" name="conpay">
    Confirm Payment</button></form><br/>
    <a class="label label-info" style="padding:10px;" href="'.$set['url'].'/contact">
    Contact Admin</a> <br/>';
    if(time() > $prof['switch']){
    echo '<br/><form method="POST"><input type="hidden" name="sender" value="'.$muprof['username'].'"/>
    </form><br/>';
    }
    echo '</div></div></div></div></div>';
       }


       echo '</div></div></div></div></div></div></div></div>';

       }

0 个答案:

没有答案