jQuery Ajax PHP安全性


                            
            

                

                    

                        

                             此问题已在此处提供答案</ b>:
                            
                         </ div>
                     </ div>
                 </ div>
                        

                             未执行PHP代码,而是显示代码 在页面上
                                
                                     (27个答案)
                                 </ span>
                         </ div>
                
已关闭 3年前</ span>。</ div>
             </ div>
         </ aside>

有什么方法可以防止jQuery AJAX检索完整的PHP文件而不是其服务器输出吗?
我只是试图获取仅文本输出,期望php决定返回什么,但是得到了整个文件。
如果像在某些文件上那样会揭示潜在的黑客攻击目标(例如数据库表等),则不理想</ p>
     </ div>

展开原文

原文

This question already has answers here:
                </div>
            </div>
                    <div class="grid--cell mb0 mt4">
                        <a href="/questions/5121495/php-code-is-not-being-executed-instead-code-shows-on-the-page" dir="ltr">PHP code is not being executed, instead code shows on the page</a>
                            <span class="question-originals-answer-count">
                                (27 answers)
                            </span>
                    </div>
            <div class="grid--cell mb0 mt8">Closed <span title="2016-06-11 11:32:29Z" class="relativetime">3 years ago</span>.</div>
        </div>
    </aside>

Is there any way to prevent jQuery AJAX retreiving a complete PHP file instead of its server output ? I just tried to obtain text only output, expecting what ever php decides to return, but got the whole file. Not ideal if as on some files it would reveal potential hacking targets such as database tables etc

</div>

1个回答


主机不允许配置私有文件,解决方案是将提供程序移动并将php放在根目录之上。</ p>
     </ div>

展开原文

原文

The host was not allowing config of private files, the solution was to move provider and place php above the root directory.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐