3

不明な理由で禁止されている403を返すURLがあります。.htaccessのmod_securityを無効にし、ファイルを0777に変更しました。URLは

http://www.veepiz.com/afrostar.php?app=help&func=addvideo

フォームにアイデアを送信するとどうなりますか?

これがコードです

function PublicAddVideo()
    {
    if (isset($_POST['submit_addvideo']))
        {
        require_once("class.phpmailer.php");     
        //send email tobirthday person
        $subject="New AfroStar Video Suggested";
        $msg = "Dear Jordah,\n".
              "Youtube video: ".$_POST['youtubesle']."\n Star Name: ".$_POST['starnamesle']."\n Country: ".$_POST['countrysle']."\n IP Address: ".getRealIpAddr();
        $mail = new PHPMailer();
        $mail->IsSMTP();                                      // set mailer to use SMTP
        $mail->Host = "localhost";  // specify main and backup server
        $mail->SMTPAuth = true;     // turn on SMTP authentication
        $mail->Username = "support@veepiz.com";  // SMTP username
        $mail->Password = "********"; // SMTP password
        $mail->From = "support@veepiz.com";
        $mail->FromName = "Veepiz";
        $mail->AddAddress('jordahz@hotmail.com',"Jordah Ferguson");
        $mail->AddReplyTo("support@veepiz.com", "Veepiz");
        $mail->WordWrap = 50;                                 // set word wrap to 50 characters
        $mail->IsHTML(true);                                  // set email format to HTML
        $mail->Subject = $subject;
        $mail->Body    = nl2br($msg);
        $mail->AltBody = $msg;
        if(!$mail->Send())
            {
            }
        ?>
        <div style='color:green;'>Admins at veepiz.com have been notified of your request and will update afrostar application accordingly.<div align='center' style='padding:10px'>&nbsp;&nbsp;<a  href='afrostar.php' onclick="return getPage('afrostar_class.php',{});" class='btn'>Back to AfroStars</a></div></div>
        <?php             
        } else
        {
        $this->DisplayHeader("Add African Video");    
        ?>
        <script language="javascript">
          var checkHelpVars=function ()
            {
            err='';
            if ($('#starnamesle').val().length==0) err+="Please type in the name of the star";
            if ($('#countrysle').val().length==0) err+="\nName of the country missing";
            if ($('#youtubesle').val().length==0) err+="\nYoutube url missing";
            var url=$('#youtubesle').val();
            var matches = url.match(/^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=[\w-]+)(?:\S+)?$/);
            if (matches) {
                } else {
                err +="\nInvalid Youtube Url";
                }                
            if (err.length>0)
                {
                alert(err);
                return false;    
                }    
            <?php 
            if (isloggedin())
                {
                echo "return postPage('afrostar_class.php?app=help&func=addvideo',{starnamesle:$('#starnamesle').val(),countrysle:$('#countrysle').val(),youtubesle:encodeURI($('#youtubesle').val()),submit_addvideo:1});";    
                } else
                {
                echo "return true;";    
                }                     
            ?>
            }  
        </script>
        <form id='helpform' method="POST" action="http://www.veepiz.com/afrostar.php?app=help&amp;func=addvideo">
        <table cellpadding="2" cellspacing="3">
            <tr>
                <td><b>Africa Artist Name:</b></td>
                <td><input id='starnamesle' type="text" style='' name='starnamesle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450px'/></td>
            </tr>
            <tr>
                <td><b>Country:</b></td>
                <td><input id='countrysle' type="text" style='' name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450'/></td>
            </tr>                
            <tr>
                <td><b>Youtube link:</b></td>
                <td><input id='youtubesle' type="text" style='' name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450'/><br/>Example:<small style='font-size:8pt;color:#666666'>http://www.youtube.com/watch?v=vJyftjMOd2w</small></td>
            </tr>                
            <tr>
                <td colspan="2" align="center"><input type="submit" class="btn" onclick="return checkHelpVars();" name='submit_addvideo' value="Finish"></td>
            </tr>                
        </table>
        </form>

        <?php    
        $this->DisplayFooter();
        }   
    }
4

8 に答える 8

8

投稿データを確認してください。URL が含まれている場合は、サーバーでブロックされる可能性があります。

送信する URL の特定の文字を置き換えてから、投稿時に元の形式に戻す必要があります。

于 2013-04-17T10:11:54.837 に答える
1

私の解決策:

渡すスクリプトの URL に埋め込む前に、渡す URL を urlencoding していないようです。

于 2015-03-31T12:36:58.210 に答える
0

カントリースルの名前が2回定義されていることに気づきました。それで、これに変更して、[フォーム内で]機能するようになりました。

        <tr>
            <td><b>Country:</b></td>
            <td><input id='countrysle' type="text"  name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:250px'/></td>
        </tr>                
        <tr>
            <td><b>Youtube link:</b></td>
            <td><input id='youtubesle' type="text" name='youtubesle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:250px'/><br/>Example:<small style='font-size:8pt;color:#666666'>http://www.youtube.com/watch?v=vJyftjMOd2w</small></td>
        </tr> 
于 2010-12-03T01:48:44.083 に答える
0

そしてここで、パーミッションを644に変更するように言う人がいます

http://www.daniweb.com/forums/thread21777.html

于 2010-12-03T01:05:43.460 に答える
0

type= "text"問題が発生しているフィールドの入力タグに属性が必要です。method= "post"また、この問題を引き起こす可能性がある get ではなく、フォーム属性で使用してみてください。

于 2012-01-02T20:23:55.560 に答える
-2

http://www.linuxforums.org/forum/servers/34130-you-dont-have-permission-access-server-solved.html

そのリンクから最後のコメントを読んでください。

「問題をググったところ、このスレッドが見つかりました。ほとんどのことは私の頭の中にありましたが、新しいフォルダーを作成し、そこに「禁止された」ファイルを置き、問題を解決しました。ありがとう!」

なんてこった!

于 2010-12-03T01:02:04.240 に答える