Flash 博客上的 PHP 密码问题
我最近在 Flashcomponents.net 上购买了一个 Flash 博客: http://www.flashcomponents.net/component /advanced_xml_flash_blog_with_cms_and_ rating_system.html 有博客和博客“编辑器”,您必须登录。密码在名为“admin.php”的 Php 文件中定义。 问题是,无论我输入什么密码,我都无法登录。
这是“admin.php”的代码:
<?php
$password = "admin";
if($_POST['un'] == $password){
print "t";
}else{
print "Access denied";
}
?>
任何人都可以帮忙吗?
I recently purchased a flash blog on Flashcomponents.net : http://www.flashcomponents.net/component/advanced_xml_flash_blog_with_cms_and_rating_system.html
There is the blog and the blog "editor", for wich you have to log in. The password is defined in a Php file named 'admin.php'.
The problem is that, whatever password I type, I never managed to log in..
Here is the code of 'admin.php' :
<?php
$password = "admin";
if($_POST['un'] == $password){
print "t";
}else{
print "Access denied";
}
?>
Can anyone help ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您也不应该这样存储密码。至少,通过 MD5 运行它:
但是,由于该变量名为“un”,并且是“admin”,我倾向于认为它是用户名而不是密码。
如果这表明了程序其余部分的质量(对于“闪存博客”,我不会感到惊讶)那么你的钱就被浪费了
You should also not store the password like that. At the very least, run it through MD5:
However, due to the fact that the variable is called 'un', and is "admin", I'd be inclined to think that it was a username and not a password.
If this is indicative of the quality of the rest of the program, (and for a "flash blog" I wouldn't be surprised) then your money was wasted
在
if
行之前添加:print_r($_POST);
以确保您认为正在发布的数据已被发布。Add before the
if
line:print_r($_POST);
to make sure the data you think is being posted is being posted.