Home Backend Development PHP Tutorial 关于点击后加载内容和 MD5的有关问题

关于点击后加载内容和 MD5的有关问题

Jun 13, 2016 am 10:25 AM
md5 new php quot str

关于点击后加载内容和 MD5的问题
我有好几个分类,就是点击后显示内容和图片的,不过我是用 display:none隐藏对应内容和图片的,那样不就是隐藏了可是内容和图片已经提前加载完了啊。。有没有方法隐藏的内容先不加载 我点击对应分类时才加载对应内容和图片?
还有一个问题我用PHP md5函数加密 111111 的 结果是 96e79218965eb72c92a549dd5a330112 这样 可是用PHP有没有方法吧 111111加密成 70-66-A4-0F-42-77-69-CC-43-34-7A-A9-6B-72-93-1A 这样?都说这个也是MD5
大大们求助,谢谢 55

------解决方案--------------------
自己写加密算法咯。原理很简单,就是将字符串按照一定的规则转换,就是加密,然后将转换后的字符串按照之前的方式反过来转换就还原了
------解决方案--------------------
1,JS延迟加载,把源地址藏在img的original属性里。
2,

PHP code
[User:root Time:11:14:10 Path:/home/liangdong/php]$ php md5.php 07-3a-8a-c0-f6-22-12-23-f1-59-26-d8-32-c3-c5-38[User:root Time:11:14:13 Path:/home/liangdong/php]$ cat md5.php <?php $md5 = md5('php,python');$md5_arr = str_split($md5, 2);$md5_new = implode('-', $md5_arr);echo $md5_new . PHP_EOL;?>[User:root Time:11:14:15 Path:/home/liangdong/php]$<br><font color="#e78608">------解决方案--------------------</font><br>搜索 70-66-A4-0F-42-77-69-CC-43-34-7A-A9-6B-72-93-1A<br>可知这个是 123456 的 MD5,而不是 111111 的 MD5<br>有人说转成 unicode 编码再 MD5 就可以得到<br>但遗憾的是 无论是转成 ucs-2be、ucs-2le、ucs-4le、ucs-4be 在php 中都不能 MD5 成<br><font color="#e78608">------解决方案--------------------</font><br>能凑活用:<br>
Copy after login
PHP code
$str = md5("111111");echo $str . "<br>";#96e79218965eb72c92a549dd5a330112function encode($str) {    $newstr = null;    for ($i = 0; $i ";#*-7-f-8-*-3-2-9-*-7-6-f-c-8-3-d-*-3-b-6-5-*-e-e-6-b-4-4-1-2-2-3function decode($str) {    $new="";    $arrStr = explode("-", $str);    foreach ($arrStr as $k => $value) {        $val = ord($value);        $tmp = chr(--$val);        if($tmp === ")")            $tmp = 9;        $new.=$tmp;    }    return $new;}echo decode(encode($str))."<br>";#96e79218965eb72c92a549dd5a330112<div class="clear">
                 
              
              
        
            </div>
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

CakePHP Logging CakePHP Logging Sep 10, 2024 pm 05:26 PM

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Services CakePHP Services Sep 10, 2024 pm 05:26 PM

This chapter deals with the information about the authentication process available in CakePHP.

See all articles