RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-236273

Eugen Eray's questions

Martin Hope
Eugen Eray
Asked: 2020-06-03 02:11:54 +0000 UTC

单击时如何删除非活动元素上的“禁用”属性?

  • 0

你需要这样做:

inPut.setAttribute("disabled", "true");
inPut.ondbclick = function(){
    inPut.setAttribute("disabled", "false")
};

但是,这不起作用,因为我单击了禁用的输入。有哪些出口?

javascript
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-17 15:48:03 +0000 UTC

使用鼠标拖动事件旋转 div

  • 2

大家好!有这样一个“类型”的均衡器旋钮:

.knob {
  width: 70px;
  height: 70px;
  position: relative;
  background-color: yellow;
  border-radius: 50%;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);
}

.knob::after {
  content: "";
  width: 2px;
  height: 48%;
  background-color: black;
  position: absolute;
  margin-left: 50%;
  margin-top: 2%;
}
<div class="knob">
</div>

帮助 JS 执行以下操作:

在事件中,onMouseDrag需要改变旋转角度,div.knob但同时角度不应超过170º和-170º,即没有大于170º和大于-170º的值。

这里有一个例子:

例子

提前致谢!

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-04-13 19:46:03 +0000 UTC

控制音频标签的频率范围 [Javascript]

  • 6

所有的哈蒙!我还没有对此进行任何搜索,但它变得很有趣:是否可以在 JavaScript(纯粹的,没有库和狗屎框架)中更改音频文件的频率范围?有点像均衡器。设置从频率开始的范围的宽度(低通、高通、低架、高架和钟频率范围)和该范围的音量级别?

javascript
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-04-10 19:34:39 +0000 UTC

无法正确地将 div 固定到页面底部

  • 4

大家好!我正在布置页面,我遇到了一个问题 -div.player当浏览器宽度改变时它“浮动”(在图片中你看到底部有一个令人不快的缩进)在此处输入图像描述我试过position: absolute; bottom: 0;了,但问题又是:在这种情况下,它与页面内容重叠。我无法在此处插入代码段,所以它在 jsfiddle 上:

脚本:https ://fiddle.jshell.net/2hgL54ww/419/

查看模式:https ://fiddle.jshell.net/2hgL54ww/419/show/

html
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-04-08 21:54:21 +0000 UTC

记住动画在哪里结束

  • 1

你好!如何记住元素保留的位置?好吧,假设他转了 260º,我需要记住,以便稍后我可以从这个地方继续动画。

document.getElementById("btn").onclick = function(){
  document.getElementById("h").classList.add("anim");
};

document.getElementById("no").onclick = function(){
  document.getElementById("h").classList.remove("anim");
};
@keyframes wheely {
  from {transform: rotate(0deg)}
  to {transform: rotate(360deg)}
}
@-webkit-keyframes wheely{
  from {transform: rotate(0deg)}
  to {transform: rotate(360deg)}
}

.anim {animation: wheely 5s linear infinite;}
<div id="h">133722848</div>
<button id="btn">анимка</button>
<button id="no">нет</button>

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-04-08 17:31:55 +0000 UTC

部分图片被剪掉

  • 2

我想快点补上,但后来我遇到了一个问题:盘子的一部分被切掉了。我只是不明白为什么。帮助请。

body {
  background-color: grey;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button {
  cursor: pointer;
}

.vinylwheel {
  width: 100%;
  height: 100%;
  background: no-repeat url("http://www.stickpng.com/assets/images/5856b3da4f6ae202fedf2794.png");
  background-size: 100% auto;
  margin: auto;
}

.mid {
  border-radius: 50%;
  width: 32%;
  background: no-repeat url("https://static1.squarespace.com/static/55fc0004e4b069a519961e2d/t/55fc301ae4b01342ae9212a1/1442590746805/");
  background-size: 100% auto;
  background-position: center;
  margin: auto;
  transform: translateY(97%);
  text-align: center;
}

.btm {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
}

#play {
  width: auto;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: white;
  border: 0;
  text-align: center;
  display: inline;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css" />

<div class="btn">
  <center>
    <button id="play">adf</button>
  </center>
</div>
<div class="vinylwheel">
  <div class="mid">
    <img src="https://static1.squarespace.com/static/55fc0004e4b069a519961e2d/t/55fc301ae4b01342ae9212a1/1442590746805/" alt="mid" style=" width: 100%; opacity: 0; visibility: hidden; z-index: -1;" />
  </div>
</div>

html
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-01-07 18:21:45 +0000 UTC

路径中有空格时的VBScript .run(带变量)

  • 0

下午好!VBScript每个人都知道,createObject(WSCript.Shell)当文件路径中有空格时,要打开文件,那么你需要这样做:

Dim prog, path
Set prog = createObject("WSCript.Shell")

prog.run("""C:\Users\Me\Desktop\my file.xls""")

三引号在这里有所帮助,但如果是这样的话:

Dim prog, path
Set prog = createObject("WSCript.Shell")
path = Left(wscript.scriptfullname, (Len(wscript.scriptfullname) - Len(wscript.scriptname))) & "my file.xls"
prog.run("cmd.exe" & " " & path) 'Ошибка

那就是在这里放双引号的地方?我对某事很愚蠢。谢谢您的帮助。

windows
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-01-04 17:48:57 +0000 UTC

找出处理器内核的数量 VBScript

  • 1

下午好!VBS 中是否有一个函数(或方法)可以让我查看处理器内核的数量?也就是说:您需要一个代码来确定处理器内核的数量。也就是说physicalCoreAmount,它应该等于处理器内核的数量。我之前在谷歌上搜索过,但要么有问题,要么答案还是直接来自中生代。谢谢您的帮助!

Option Explicit 

Dim runBatch, coreAmount, physicalCoreAmount
Rem physicalCoreAmount – должно равняться кол-ву ядер процессора
Set runBatch = CreateObject(WSCript.shell)

Do
coreAmount = inputBox("Укажите кол-во ядер (Set your amount of cores)", "Укажите колличество ядер")
If coreAmount = "" then
  msgbox "Введите количество ядер!",vbOkOnly + vbCritical,"Ошибка"
Else If not IsNumeric(coreAmount) then
  msgbox "Введите числовое значение!",vbOkOnly + vbCritical,"Ошибка"
Else If InStr(1, coreAmount, ".", vbTextCompare) > 0 or InStr(1, coreAmount, ",", vbTextCompare) > 0  then
  msgbox "Введите числовое значение без точки или запятой!",vbOkOnly + vbCritical,"Ошибка"
Else If coreAmount > physicalCoreAmount then
  msgbox "Введите верное количество ядер. Не более" + physicalCoreAmount + ".",vbOkOnly + vbCritical,"Ошибка"
Else
  exit do   
Loop
windows
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-06-04 16:06:01 +0000 UTC

preg_replace 不工作[关闭]

  • 0
关闭 这个问题是题外话。目前不接受回复。

问题是一个不再复现的issue,或者错别字引起的。虽然类似的问题可能与此站点相关,但此问题的解决方案不太可能对未来的访问者有所帮助。像这样的问题通常可以通过编写和研究一个最小的程序来避免,在发布问题之前重现问题。

5 年前关闭。

改进问题

在地址栏中输入时index.php,它仍然不会重定向到indexwithout .php。试过在线测试 - 一切正常。错误在哪里?

$pattern = "/\.(php|html|asp|aspx|phtml|shtml)/i";

if(preg_match($pattern, $_SERVER['REQUEST_URI'])){
   $currentPage = $_SERVER['REQUEST_URI'];
   $shortCut = preg_replace($pattern, "", $shortCut);
   header("Location:".$shortCut);
}
php
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-31 16:44:38 +0000 UTC

删除 nginx 中的 .php 扩展名

  • -1

大家好!一个常见的问题,我看了很多关于这个的,但是我不明白nifiga。

我在网站上有以下类型的所有链接:所有文件和子目录中的文件都不是等等contactinf。contactinf.php用 PHP + .htaccess 代码实现:

PHP:

if(stristr($_SERVER['REQUEST_URI'], ".php")){
   $currentPage = $_SERVER['PHP_SELF'];
   $shortCut = str_replace(".php", "", $currentPage);
   header("Location:".$shortCut);
}

.htaccess:

Options +MultiViews

这在 nginx 中不起作用,由于我没有.php在链接末尾指定,我所有的链接都停止工作。如有必要,我将附上完整的配置nginx.conf文件:

#load_module "modules/ngx_http_image_filter_module.so";
#load_module "modules/ngx_http_perl_module.so";
#load_module "modules/ngx_http_xslt_filter_module.so";
#load_module "modules/ngx_mail_module.so";
#load_module "modules/ngx_stream_module.so";

user                         root admin;
worker_processes             4;

events {
    worker_connections       27000;
}

http {
    include       		    mime.types;
    default_type             text/html;
	charset                  utf-8;
	error_page 500           http://localhost/errors/undefined;
    error_page 404           http://localhost/errors/undefined;
    error_page 403           http://localhost/errors/undefined;
	gzip                     on;
	gzip_types               text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon image/png image/jpeg;
    
    sendfile                 on;

	server {
		listen               80 default_server;

		# MAMP DOCUMENT_ROOT !! Don't remove this line !!
		root                 "/Users/eugen/Documents/HTML,CSS,PHP, JavaScript,XML lessons/ER website/en/";

		access_log           /Applications/MAMP/logs/nginx_access.log;
		error_log            /Applications/MAMP/logs/nginx_error.log;

		location / {
               index index.html index.htm index.php; 
		}
	  
	    
		location ~* /MAMP[^-]*(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}

		location ~* /phpMyAdmin(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}

		location ~* /phpPgAdmin(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}
		
		location ~* /phpLiteAdmin(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}
		
		location ~* /SQLiteManager(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}

		location ~* /adminer(.*)$ {
			root             /Applications/MAMP/bin;
			index            adminer.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}
		
		    location ~ .(ini|phps|log|txt|rtf)$ {
              deny all;
              allow 192.168.0.101;
              allow 192.168.0.100;
              allow 192.168.0.102;
              allow 93.75.31.82;
              allow 127.0.0.1;
         }
		
		location /icons {
			alias /Applications/MAMP/Library/icons;
			autoindex on;
		}
		
		location /favicon.ico {
			alias /Applications/MAMP/bin/favicon.ico;
            # log_not_found off;
            # access_log off;
		}

		location ~ \.php$ {
			try_files        $uri =404;
			fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
			fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
			include          fastcgi_params;
		}

		location ~ /\. {
			deny all;
		}

		# location ~* \.(gif|jpg|png|pdf)$ {
        #	expires          30d;
		# }

   		# location = /robots.txt {
        #	allow all;
        #	log_not_found off;
        #	access_log off;
   		# }

	    # location ~* \.(txt|log)$ {
        #	allow 127.0.0.1;
        #	deny all;
   		# }
   		
   		# location ~ \..*/.*\.php$ {
        #	              return 403;
   		# }

		location /nginx_status {
			stub_status      on;
			access_log       off;
			allow            127.0.0.1;
			deny			 all;
		}
	}

    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

	#	 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}

http {
    include       		    mime.types;
    default_type             text/html;
	charset                  utf-8;
	error_page 500           http://localhost/errors/undefined;
    error_page 404           http://localhost/errors/undefined;
    error_page 403           http://localhost/errors/undefined;
	gzip                     on;
	gzip_types               text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon image/png image/jpeg;
    
    sendfile                 on;

	server {
		listen               80 default_server;

		# MAMP DOCUMENT_ROOT !! Don't remove this line !!
		root                 "/Users/eugen/Documents/HTML,CSS,PHP, JavaScript,XML lessons/ER website/en/";

		access_log           /Applications/MAMP/logs/nginx_access.log;
		error_log            /Applications/MAMP/logs/nginx_error.log;

		location / {
               index index.html index.htm index.php;


             #Deny access for commom bad bots spiders and robots
			
			if (!-e $request_filename){
                return 403;}
			if ($query_string ~ "GLOBALS(=|\[|\%[0-9A-Z]{0,2})"){
                 return 403;}
            if ($query_string ~ "FILES(=|\[|\%[0-9A-Z]{0,2})"){
              return 403;}
            if ($query_string ~ "_REQUEST(=|\[|\%[0-9A-Z]{0,2})"){
              return 403;}
			if ($http_user_agent ~* "^BlackWidow"){
              return 403;}
			if ($http_user_agent ~* "^Bot\ mailto:craftbot@yahoo.com"){
              return 403;}
			if ($http_user_agent ~* "^ChinaClaw"){
              return 403;}
			if ($http_user_agent ~* "^Custo"){
              return 403;}
			if ($http_user_agent ~* "^DISCo"){
              return 403;}
			if ($http_user_agent ~* "^Download\ Demon"){
              return 403;}
			if ($http_user_agent ~* "^eCatch"){
              return 403;}
			if ($http_user_agent ~* "^EirGrabber"){
              return 403;}
			if ($http_user_agent ~* "^EmailSiphon"){
              return 403;}
			if ($http_user_agent ~* "^EmailWolf"){
              return 403;}
			if ($http_user_agent ~* "^Express\ WebPictures"){
              return 403;}
			if ($http_user_agent ~* "^ExtractorPro"){
              return 403;}
			if ($http_user_agent ~* "^EyeNetIE"){
              return 403;}
			if ($http_user_agent ~* "^FlashGet"){
              return 403;}
			if ($http_user_agent ~* "^GetRight"){
              return 403;}
			if ($http_user_agent ~* "^GetWeb!"){
              return 403;}
			if ($http_user_agent ~* "^Go!Zilla"){
              return 403;}
			if ($http_user_agent ~* "^Go-Ahead-Got-It"){
              return 403;}
			if ($http_user_agent ~* "^GrabNet"){
              return 403;}
			if ($http_user_agent ~* "^Grafula"){
              return 403;}
			if ($http_user_agent ~* "^HMView"){
              return 403;}
			if ($http_user_agent ~* "HTTrack"){
              return 403;}
			if ($http_user_agent ~* "^Image\ Stripper"){
              return 403;}
			if ($http_user_agent ~* "^Image\ Sucker"){
              return 403;}
			if ($http_user_agent ~* "Indy\ Library"){
              return 403;}
			if ($http_user_agent ~* "^InterGET"){
              return 403;}
			if ($http_user_agent ~* "^Internet\ Ninja"){
              return 403;}
			if ($http_user_agent ~* "^JetCar"){
              return 403;}
			if ($http_user_agent ~* "^JOC\ Web\ Spider"){
              return 403;}
			if ($http_user_agent ~* "^larbin"){
              return 403;}
			if ($http_user_agent ~* "^LeechFTP"){
              return 403;}
			if ($http_user_agent ~* "^Mass\ Downloader"){
              return 403;}
			if ($http_user_agent ~* "^MIDown\ tool"){
              return 403;}
			if ($http_user_agent ~* "^Mister\ PiX"){
              return 403;}
			if ($http_user_agent ~* "^Navroad"){
              return 403;}
			if ($http_user_agent ~* "^NearSite"){
              return 403;}
			if ($http_user_agent ~* "^NetAnts"){
              return 403;}
			if ($http_user_agent ~* "^NetSpider"){
              return 403;}
			if ($http_user_agent ~* "^Net\ Vampire"){
              return 403;}
			if ($http_user_agent ~* "^NetZIP"){
              return 403;}
			if ($http_user_agent ~* "^Octopus"){
              return 403;}
			if ($http_user_agent ~* "^Offline\ Explorer"){
              return 403;}
			if ($http_user_agent ~* "^Offline\ Navigator"){
              return 403;}
			if ($http_user_agent ~* "^PageGrabber"){
              return 403;}
			if ($http_user_agent ~* "^Papa\ Foto"){
              return 403;}
			if ($http_user_agent ~* "^pavuk"){
              return 403;}
			if ($http_user_agent ~* "^pcBrowser"){
              return 403;}
			if ($http_user_agent ~* "^RealDownload"){
              return 403;}
			if ($http_user_agent ~* "^ReGet"){
              return 403;}
			if ($http_user_agent ~* "^SiteSnagger"){
              return 403;}
			if ($http_user_agent ~* "^SmartDownload"){
              return 403;}
			if ($http_user_agent ~* "^SuperBot"){
              return 403;}
			if ($http_user_agent ~* "^SuperHTTP"){
              return 403;}
			if ($http_user_agent ~* "^Surfbot"){
              return 403;}
			if ($http_user_agent ~* "^tAkeOut"){
              return 403;}
			if ($http_user_agent ~* "^Teleport\ Pro"){
              return 403;}
			if ($http_user_agent ~* "^VoidEYE"){
              return 403;}
			if ($http_user_agent ~* "^Web\ Image\ Collector"){
              return 403;}
			if ($http_user_agent ~* "^Web\ Sucker"){
              return 403;}
			if ($http_user_agent ~* "^WebAuto"){
              return 403;}
			if ($http_user_agent ~* "^WebCopier"){
              return 403;}
			if ($http_user_agent ~* "^WebFetch"){
              return 403;}
			if ($http_user_agent ~* "^WebGo\ IS"){
              return 403;}
			if ($http_user_agent ~* "^WebLeacher"){
              return 403;}
			if ($http_user_agent ~* "^WebReaper"){
              return 403;}
			if ($http_user_agent ~* "^WebSauger"){
              return 403;}
			if ($http_user_agent ~* "^Website\ eXtractor"){
              return 403;}
			if ($http_user_agent ~* "^Website\ Quester"){
              return 403;}
			if ($http_user_agent ~* "^WebStripper"){
              return 403;}
			if ($http_user_agent ~* "^WebWhacker"){
              return 403;}
			if ($http_user_agent ~* "^WebZIP"){
              return 403;}
			if ($http_user_agent ~* "^Wget"){
              return 403;}
			if ($http_user_agent ~* "^Widow"){
              return 403;}
			if ($http_user_agent ~* "^WWWOFFLE"){
              return 403;}
			if ($http_user_agent ~* "^Xaldon\ WebSpider"){
              return 403;}
			if ($http_user_agent ~* "^Zeus"){
              return 403;}  
			  
			rewrite ^(/.*)\.php(\?.*)?$ $1$2 permanent;
            rewrite ^/(.*)/$ /$1 permanent;
            try_files $uri/index.php $uri.php $uri/ $uri =404;  
		}
	
		location ~* /MAMP[^-]*(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}

		location ~* /phpMyAdmin(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}

		location ~* /phpPgAdmin(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}
		
		location ~* /phpLiteAdmin(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}
		
		location ~* /SQLiteManager(.*)$ {
			root             /Applications/MAMP/bin;
			index            index.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}

		location ~* /adminer(.*)$ {
			root             /Applications/MAMP/bin;
			index            adminer.php;

			location ~ \.php$ {
				try_files        $uri =404;
				fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
				fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
				include          fastcgi_params;
			}
		}
		
		    location ~ .(ini|phps|log|txt|rtf)$ {
              deny all;
              allow 192.168.0.101;
              allow 192.168.0.100;
              allow 192.168.0.102;
              allow 93.75.31.82;
              allow 127.0.0.1;
         }
		
		location /icons {
			alias /Applications/MAMP/Library/icons;
			autoindex on;
		}
		
		location /favicon.ico {
			alias /Applications/MAMP/bin/favicon.ico;
            # log_not_found off;
            # access_log off;
		}

		location ~ \.php$ {
			try_files        $uri =404;
			fastcgi_pass     unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
			fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
			include          fastcgi_params;
		}

		location ~ /\. {
			deny all;
		}

		# location ~* \.(gif|jpg|png|pdf)$ {
        #	expires          30d;
		# }

   		# location = /robots.txt {
        #	allow all;
        #	log_not_found off;
        #	access_log off;
   		# }

	    # location ~* \.(txt|log)$ {
        #	allow 127.0.0.1;
        #	deny all;
   		# }
   		
   		# location ~ \..*/.*\.php$ {
        #	              return 403;
   		# }

		location /nginx_status {
			stub_status      on;
			access_log       off;
			allow            127.0.0.1;
			deny			 all;
		}
	}

    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

	#	 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}

php
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-27 18:37:37 +0000 UTC

样式输入类型=滑块前的范围

  • 8

你好!滑块有这样的样式:

input[type=range] {-webkit-appearance: none; margin: 5.8px 0; background-color: transparent !important;}

input[type=range]:focus {outline: none;}

input[type=range]::-webkit-slider-runnable-track {cursor: pointer; box-shadow: 2.4px 2.4px 6.2px rgba(7, 7, 163, 0.72), 0px 0px 2.4px rgba(8, 8, 187, 0.72); background: #ac62ff; border-radius: 21.6px; border: 1px solid rgba(163, 0, 255, 0.79);}

input[type=range]::-webkit-slider-thumb {box-shadow: 2.4px 2.4px 9.5px rgba(4, 16, 14, 0.78), 0px 0px 2.4px rgba(9, 36, 32, 0.78); border: 1.8px solid rgba(0, 0, 6, 0.77); border-radius: 28px; background: #ffff29; cursor: pointer; -webkit-appearance: none; margin-top: -7.8px;}

input[type=range]:focus::-webkit-slider-runnable-track {background: #b16cff;}

input[type=range]::-moz-range-track {width: 100%; cursor: pointer; box-shadow: 2.4px 2.4px 6.2px rgba(7, 7, 163, 0.72), 0px 0px 2.4px rgba(8, 8, 187, 0.72); background: #ac62ff; border-radius: 21.6px; border: 1px solid rgba(163, 0, 255, 0.79);}

input[type=range]::-moz-range-thumb {box-shadow: 2.4px 2.4px 9.5px rgba(4, 16, 14, 0.78), 0px 0px 2.4px rgba(9, 36, 32, 0.78); border: 1.8px solid rgba(0, 0, 6, 0.77); border-radius: 28px; background: #ffff29; cursor: pointer;}

input[type=range]::-ms-track {width: 100%; cursor: pointer; background: transparent; border-color: transparent; color: transparent;}

input[type=range]::-ms-fill-lower {background: #a758ff; border: 1px solid rgba(163, 0, 255, 0.79); border-radius: 43.2px; box-shadow: 2.4px 2.4px 6.2px rgba(7, 7, 163, 0.72), 0px 0px 2.4px rgba(8, 8, 187, 0.72);}

input[type=range]::-ms-fill-upper {background: #ac62ff; border: 1px solid rgba(163, 0, 255, 0.79); border-radius: 43.2px; box-shadow: 2.4px 2.4px 6.2px rgba(7, 7, 163, 0.72), 0px 0px 2.4px rgba(8, 8, 187, 0.72);}

input[type=range]::-ms-thumb {box-shadow: 2.4px 2.4px 9.5px rgba(4, 16, 14, 0.78), 0px 0px 2.4px rgba(9, 36, 32, 0.78); border: 1.8px solid rgba(0, 0, 6, 0.77); border-radius: 28px; background: #ffff29; cursor: pointer;}

input[type=range]:focus::-ms-fill-lower {background: #ac62ff;}

input[type=range]:focus::-ms-fill-upper {background: #b16cff;}

/* Track */
input[type=range]::-webkit-slider-runnable-track {height: 6.4px;}
input[type=range]::-moz-range-track {height: 6.4px;}
input[type=range]::-ms-track {height: 6.4px;}

/* Thumb */
input[type=range]::-webkit-slider-thumb {height: 20px; width: 8px;}
input[type=range]::-moz-range-thumb {height: 20px; width: 8px;}
input[type=range]::-ms-thumb {height: 20px; width: 8px;
<input type="range" value="0" min="0" max="100" step="1"/>

我的任务是更改拨动开关前面滑块的颜色。怎么做?

如果不清楚,我可以举个例子。

html
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-25 17:10:14 +0000 UTC

重叠的弹性容器元素

  • 1

问候!我在帮助下布置了一个菜单,flexbox我遇到了一个问题,如果我把flex-wrap: wrap;,那么元素就会层叠在一起。这很可能是由于padding“和我的链接,如何解决?这是代码:

结果是这样的:

@charset "UTF-8";
	
* {
  margin: 0; 
  padding: 0; 
  font-family: Arial;}
html {
  height: 100%; 
  unicode-bidi: embed;
  direction: ltr;}
body {
  background-color: #6C238D;}
.menu {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #4F1373;
  padding: 10px 0px;}
.menu ul {display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  list-style: none;
  flex-direction: row;
  margin: 5px 0px;
  flex-wrap: wrap;}
.menu ul li {flex-grow: 1;
  text-align: center;
  flex-basis: auto;
  font-size: 1.2em;}
.menu li a {
  text-decoration: none;
  color: #EAE6E6;
  padding: 5px 12px;
  background-color: #37196F;
  border: 2px outset #301B4F;
  -webkit-box-shadow: 0px 0px 13px 3px rgba(48,17,48,0.67);
   -moz-box-shadow: 0px 0px 13px 3px rgba(48,17,48,0.67);
   -ms-box-shadow: 0px 0px 13px 3px rgba(48,17,48,0.67);
   -o-box-shadow: 0px 0px 13px 3px rgba(48,17,48,0.67);		
   box-shadow: 0px 0px 13px 3px rgba(48,17,48,0.67);
	}
  
.menu li a:hover {
  color: #BE962F;
  border: 2px inset #301B4F;}
<div class="menu">
    <ul>
    	<li><a href="#">This page</a></li>
    	<li><a href="#">Another page</a></li>
    	<li><a href="#">And another page</a></li>
    </ul>
</div>

默认情况下: 弹性盒子

我希望它在屏幕缩小时均匀向下移动,但结果是这样的: 弹性盒子2

html
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-22 18:27:19 +0000 UTC

如何用字符串中的正则表达式替换冒号

  • -2

有这样一行:11: oooops,但是例如你需要这样:0- oooops。如何使用正则表达式写这个String.replace()?

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-20 17:01:14 +0000 UTC

如何正确编写以下 JavaScript 选择器 [不是 jQuery]

  • 3

我想写一个这样的选择器:

document.querySelectorAll(".smallinnertable:not(:has(a))");

适用于 jQuery,但不适用于纯 JS。这样的选择器是非常有必要的。谢谢您的帮助。

javascript
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-20 15:46:41 +0000 UTC

如何在页面上设置滚动条的样式

  • 0

我在Essential template里看到这个,想问一下怎么给右边的scrollbar设置样式?这是一张照片。他是蓝色的,在她身上更厚,而不是标准的。图片: 在此处输入图像描述

html
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-18 18:20:22 +0000 UTC

不带 VALUES 的 INSERT 查询

  • 3

大家好。这是我想到的问题(不是为了SET):

有这样一个请求:

mysqli_query($dataBase, "INSERT INTO `Users` VALUES ('','$email','$name','$pass','$gend','$startImg');");

我想这样写:

INSERT INTO `Users` VALUES `id` = 2, `email` = '$email', `nickname` = '$name';

如何做对。不想使用 PDO(命名占位符)。

php
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-10 15:03:30 +0000 UTC

居中 div,绝对位置在父级的宽度上

  • 0

有这样一个问题:你需要div.preview-box #timeCodeContainer在中心div.preview-box。我不知道该怎么做。transform: translate()并告诉我更多,对齐时是否比更准确margin:?这是代码:

div.preview-section {
  position: absolute;
  width: 100px;
  height: 70px;
  transform: translateY(-106%);
  margin-top: 200px;
}

div.preview-box {
  position: relative;
  width: 100px;
  height: 70px;
  background-image: linear-gradient(to top, #252323, rgba(0, 0, 0, 0.86));
  -webkit-background-image: linear-gradient(to top, #252323, rgba(0, 0, 0, 0.86));
  -moz-background-image: linear-gradient(to top, #252323, rgba(0, 0, 0, 0.86));
  -o-background-image: linear-gradient(to top, #252323, rgba(0, 0, 0, 0.86));
  -ms-background-image: linear-gradient(to top, #252323, rgba(0, 0, 0, 0.86));
  border: 1px solid rgba(0, 0, 0, 0.84);
  box-sizing: border-box;
  border-bottom: 0;
  box-shadow: inset 0 0 0 2px #363131;
  -webkit-box-shadow: inset 0 0 0 2px #363131;
  -moz-box-shadow: inset 0 0 0 2px #363131;
  -ms-box-shadow: inset 0 0 0 2px #363131;
  -o-box-shadow: inset 0 0 0 2px #363131;
}

div.preview-box #frameContainer {
  width: 96%;
  height: 58px;
  background: #E0E0E0;
  margin: 1px auto 0px;
}

div.preview-box #timeCodeContainer {
  width: 34px;
  font-size: 0.70em;
  background-color: #171616;
  text-align: center;
  position: absolute;
  color: white;
}
<div class="preview-section">
  <div class="preview-box">
    <div id="frameContainer"></div>
    <div id="timeCodeContainer">0:00</div>
  </div>
</div>

html
  • 1 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-05-10 02:45:20 +0000 UTC

使用 ::after 在 div 上制作边框

  • 1

我需要一个额外的框架,以后可以将更多内容推送到其中。我没能把它理顺。这是代码。

div.preview-box {position: absolute; width: 70px; height: 60px; background-image: linear-gradient(to top, #252323, rgba(0,0,0, 0.86)); 
border: 1px solid black; border-bottom: 0px;}
div.preview-box::after {content: ""; border: 2px solid #343333; position: fixed; width: 68px; height: 58px;}
<div class="preview-box"></div>

也就是说,框架必须居中并在1px每一侧缩进。

html
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-04-29 17:06:48 +0000 UTC

SHA512 中的哈希值在 jQuery 中没有废话

  • 0

是否有可能SHA512在没有大量函数、循环和东西的情况下在 jQuery 中获取字符串的哈希值。例如,我需要散列一个字符串:

input {width: 300px;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<input type="text" id="password" placeholder="ВВЕДИТЕ ЧТО-НИБУДЬ"/><button id="act">Конвертнуть</button>
<br/>
<input type="text" disabled id="hashOutput" placeholder="SHA512 хеш введенной строки"/>

按下按钮时在第一个字段中输入Конвертнуть。如何尽可能简单和合乎逻辑地做到这一点?

javascript
  • 2 个回答
  • 10 Views
Martin Hope
Eugen Eray
Asked: 2020-04-27 03:32:16 +0000 UTC

退格键不适用于此脚本的输入

  • 1

问题是这样的:有一个 jQuery 脚本

$("#captchaField").on("keypress keydown blur",function (event) { 
"use strict";
     $(this).val($(this).val().replace(/[^\d].+/, ""));
      if ((event.which < 48 || event.which > 57)) {
        event.preventDefault();}
}); 

它只允许您在该字段中输入数字,但是当我尝试通过单击backspace它来清除它或通过突出显示某个字符并尝试将其替换为另一个字符来替换其当前值时(我无法解释它,但您可以input选择字符并且当您按任何带有符号的键时input,您选择的值将更改为键字符)。使用此脚本,可以减少这些可能性。帮助把他们带回来。

javascript
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5