如何在php中解密URL链接 [英] How to decrypt URL link in php

查看:94
本文介绍了如何在php中解密URL链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在php中加密了我的url链接

I encrypted my url link in php

$link =base64_encode('page2.php')

<form id="test" action="<?php echo $link;?>" method="post">





喜欢这样,但是当我运行此代码时它显示





like this but when i run this code it shows

the requested url "http://localhost/Code/Report%20s/trR42JWpCV1ncxbuD0Gv8vFsMsn6//FVmZ5XNQp1glo=" was not found in this server







这是我想在地址中显示的内容吧可以,但如何在浏览器中显示'page2.php'内容?在地址栏中没有显示/page2.php



提前谢谢




this is what i want to show in the address bar is ok but how to show 'page2.php' content in browser? without show "/page2.php" in address bar

Thanks in advance

推荐答案

link = base64_encode(' page2.php'

< 表格 id = test action = <?php echo
link =base64_encode('page2.php') <form id="test" action="<?php echo


link;?> method < span class =code-keyword> = 发布 >
link;?>" method="post">





喜欢这个但是当我运行这个代码时它会显示





like this but when i run this code it shows

the requested url "http://localhost/Code/Report%20s/trR42JWpCV1ncxbuD0Gv8vFsMsn6//FVmZ5XNQp1glo=" was not found in this server







这是我想在地址栏中显示的确定但是如何在浏览器中显示'page2.php'的内容?在地址栏中没有显示/page2.php



提前致谢




this is what i want to show in the address bar is ok but how to show 'page2.php' content in browser? without show "/page2.php" in address bar

Thanks in advance


你必须使用URL重写 - 如果你使用Apache,这应该有所帮助: http://httpd.apache.org/docs/2.4/rewrite/ [ ^ ]



您应该记住,URL重写通常用于使URL更具可读性,因此更适合搜索引擎。你要做的是使它更不易读。
You have to use URL rewriting for that - if you're using Apache, this should help: http://httpd.apache.org/docs/2.4/rewrite/[^]

You should bear in mind that URL rewriting is usually used to make URLs more readable and therefore better for search engines. What you are trying to do makes it even less readable.


这篇关于如何在php中解密URL链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆