我正在使用 PHTML 编码器对我的 php 文件进行编码,但当我运行编码文件时,它给出错误“调用未定义的函数 dl()”。请有人帮忙。
<?php
if(!function_exists("phtmldec")){
$w=(substr(PHP_OS,0,3)=="WIN")?1:0;$ln="phtmlenc".phpversion();$cd=dirname(__FILE__);
if($w){
$ln=$ln.".dll";if($cd[1]==":") $cd=substr($cd,2);
} else {
$ln=$ln.".so";if(strlen($cd)<3) $cd=getcwd();
}
if(version_compare(phpversion(),"5.2.5")==-1){
$cd1=ini_get('extension_dir');
$cd2=PHP_EXTENSION_DIR;
if($cd[strlen($cd)-1]!="/")$cd=$cd."/";
if($cd1[strlen($cd1)-1]!="/")$cd1=$cd1."/";
if($cd2[strlen($cd2)-1]!="/")$cd2=$cd2."/";
if($cd1[1]==":") $cd1=substr($cd1,2);
if($cd2[1]==":") $cd2=substr($cd2,2);
$ic=substr_count($cd,"\\")+substr_count($cd,"/");
$ic1=substr_count($cd1,"\\")+substr_count($cd1,"/");
$ic2=substr_count($cd2,"\\")+substr_count($cd2,"/");
$en=str_repeat("../",max($ic,$ic1,$ic2))."..".$cd.$ln;
} else {
$en=$ln;$r=dl($en);if(!$r)exit("Unable to load $en");
}
$p="F4\$A016YC2@Y(8Q[Y!2F3[@K2.0>K0Z%5^#2\\,&;5L7\$<KHL)BH<`";
phtmldec($p);
}
?>
Run Code Online (Sandbox Code Playgroud) 我知道我的问题有点模糊,但是我觉得管理国家/地区的地址实际上很普遍,因此我想从我的实际设置中获取一些建议。
I have a database with a "country" column, previously it was a medium int type, acting as Foreign Key to another table with the actual information about the countries (id, name and ISO3166-1 alpha2 code mainly).
After some testing and benchmarking I ended up having all the countries information in a php file array instead, including/requiring it when needed, and it was like one or two orders of magnitude faster than querying the database. (they are 278 countries).
So …
所以我有2个区域,浴室和(浴室)套房.
我限制它,所以连接区域永远不会比浴室更大,如果你降低浴室的价值,它会改变套间价值,所以它保持不变.
这个脚本实际上很简单并且运行良好,但是我注意到如果我把浴室数量设置为等于或高于9的值,它开始表现得很奇怪.如果浴室是15,例如,套间将从1到15直接跳,如果你降低浴室它不再工作,它实际上像20或2000 = 2,忽略其余的数字并采取的数值仅限第一位数字.
HTML:
<label for="fbathrooms">Bathrooms</label><input id="fbathrooms" name="fbathrooms" type="number" min="0"/><br/>
<label for="fensuite" style="display:none">En Suite</label><input id="fensuite" name="fensuite" type="number" min="0" style="display:none;"/>?
Run Code Online (Sandbox Code Playgroud)
码:
function bathroomsTrigger(){
if($('#fbathrooms').val() > 0){
$('#fensuite').slideDown('fast');
$('label[for="fensuite"]').slideDown('fast');
} else {
$('#fensuite').slideUp('fast');
$('label[for="fensuite"]').slideUp('fast');
$('#fensuite').val(0);
}
if($('#fensuite').val() > $('#fbathrooms').val()){
$('#fensuite').val($('#fbathrooms').val());
}
}
function ensuiteTrigger(){
if($('#fensuite').val() > $('#fbathrooms').val()){
$('#fensuite').val($('#fbathrooms').val());
}
}
$('#fbathrooms').keyup(bathroomsTrigger);
$('#fbathrooms').change(bathroomsTrigger);
$('#fensuite').keyup(ensuiteTrigger);
$('#fensuite').change(ensuiteTrigger);?
Run Code Online (Sandbox Code Playgroud)
让我疯狂,已经调整了几个小时已经xD了
非常感谢帮助.
(它可能是一个html5错误吗?)