php代码
<?php function encode_file_contents($filename) { $type=strtolower(substr(strrchr($filename,’.'),1)); if(’php’==$type && is_file($filename) && is_writable($filename)){// 如果是PHP文件 并且可写 则进行压缩编码 $contents = file_get_contents($filename);// 判断文件是否已经被编码处理 $pos = strpos($contents,’powered by arzn QQ:1314778′); if(false === $pos || $pos>100){ // 去除PHP文件注释和空白,减少文件大小 $contents = php_strip_whitespace($filename); // 去除PHP头部和尾部标识 $headerPos = strpos($contents,’’); $contents = substr($contents,$headerPos+5,$footerPos-$headerPos); $encode = base64_encode(gzdeflate($contents));// 开始编码 $encode = ‘"; return file_put_contents($filename,$encode); } } return false; } //调用函数 $filename=’code.php’; encode_file_contents($filename); echo "OK,加密完成!" ?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1
Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version
