php mouse right click event, js shields mouse and keyboard events (including mouse right button, arrow keys, backspace key, F5 refresh key, etc.), compatible with IE and firefox…

js shields mouse and keyboard events , here mainly introduces how to use js shield including right mouse button , arrow keys , backspace key , F5 refresh key , Ctrl+ Events such as N,Shift+F10, are also compatible with IE, firefox, Google and other browsers. The specific code is as follows (note that the , that is not compatible with Firefox must be compatible with Firefox) : js shields mouse and keyboard events (including the right mouse button, arrow keys, backspace key, and F5 refresh key Etc.), compatible with IE and firefox //shield the right mouse button document.οncοntextmenu=function(){ alert('forbid the right mouse button menu !'); return false; } //Block F1 help , only for IE window.onhelp=function(){ alert('Forbid F1 help!'); return false; } document.οnkeydοwn=function(e){ e=e||event; //alert(e. keyCode);//You can check the keyCode of each button if(e.keyCode==13){ alert('Enter is forbidden Key!'); return false; } //Backspace and delete key if(e .keyCode==8){ alert('No backspace delete!'); return false; } //Block the left arrow key if(e.keyCode==37){ alert( 'Forbid the left arrow key!'); return false; } //Block the upward arrow key if(e.keyCode==38){ alert('Prohibit the upward arrow key!'); return false; } //Block the right arrow key if(e.keyCode==39) { alert('Forbid the right arrow key!'); return false; } //shield the downward…

thinkphp5 requests data, respectively requesting dynamic methods, static methods, class introduction, obtaining vendor methods, etc.

TP5.1 :request request object ( use four ways to get ) Prepare : Create under index/controller A file named requests.php ( Note : Do not name it request , because it is a keyword , is not allowed to be named ) Dynamic The difference between method and static method : Static method : public static function test(){} Dynamic method :; public function test() {} It can be seen that ,their difference is that one is a static method,the other is an ordinary method. Dynamic method usage request Access :localhost/tp5 framework directory/thinkpublic//index.php/index/requests/request?name=' small hamster through url '&age=18 Use via static proxy Output : Using requests via dependency injection Result &#xff1a ; Use it through the encapsulated properties in the Controller class Result :

phpftp block download, phpftp class (upload, download, copy, move, etc.)

1, ftp class code /** * Function :FTP operation class (copy, move, delete file/create directory) * time :2012/5/9 * author : glad to follow the wind * site:www.jbxue.com */ class class_ftp { public $off; // return operation status (success/failure) public $conn_id; // FTP connection /** * method :FTP connection * @FTP_HOST — FTP host * @FTP_PORT — port * @FTP_USER — username * @FTP_PASS — password */ function __construct($FTP_HOST,$FTP_PORT,$FTP_USER,$FTP_PASS) { $this->conn_id = @ftp_connect($FTP_HOST,$FTP_PORT) or die(“FTP server connection failed”); @ftp_login($this->conn_id,$FTP_USER,$ FTP_PASS) or die(“FTP server login failed”); @ftp_pasv($this->conn_id,1); // Open passive simulation } } /** * method :upload file * @path — local path * @ 64;newpath — upload path * @type — if the target directory does not exist, create a new one */ function up_file($path ,$newpath,$type=true) { if($type) $this->dir_mkdirs($newpath); $this ->off = @ftp_put($this->conn_id,$newpath,$path,FTP_BINARY); if(!$this->off) echo “File upload failed& #xff0c;Please check whether the permissions and path are correct!”; } /** * method : move file * @path — original path * @newpath — new path * @type — if target Create a new directory if it does not exist */ function move_file($path,$newpath,$type=true) { if($type) $this->dir_mkdirs($newpath); $this->off = @ftp_rename($this->conn_id, $path, $newpath ); if(!$this->off) echo “Failed to move the file, Please check the…

include detailed explanation of shell_detailed explanation of php file inclusion principle (reading file source code, picture horse, various protocols, remote getshell, etc.)……

Detailed explanation of the principles of php file inclusion (reading file source code, picture horse, various protocols, remote getshell, etc.) The author is namezz (After reading the picture, it is equivalent to doing it A round of experiment series) The existing file code is as follows Include is similar to include_once, require, and require_once , so I will only give an example of include. Not much to say,Start the text. (The text is too long-winded, just look at the summary) Function description Contains aaa and zzz, the effect is shown in the figure below Read the content of the zzz file<?phpecho __FILE__; And parsed and executed , and the aaa file was not recognized as php, so the source code content was output directly. So include /etc/passwd in the same way Use readfile to read the file as shown in the figure Because of adding the picture header,, the browser recognizes it as a picture type. f12 or packet capture can see the status of the response packet , you can see that the difference from include etc. is that , readfile directly reads the file content , without parsing. The same is true for file_get_content (usage by Baidu). Principle…

PHP does file verification, MD5, CRC32, SHA, etc.

Function hash_file(): Generate a hash using the contents of a given file Help string hash_file ( string $algo , string $filename [, bool $raw_output = false ] ) parameter algo The name of the hash algorithm to use, eg: “md5”, “sha256”, “haval160,4”, etc. // Some available algos provided by netizens and the performance tested on other machines ALGO: md2, time: 2.0341160297394 ALGO: md4, time: 0.062004089355469 ALGO: md5, time: 0.071003913879395 ALGO: sha1, time: 0.086004972457886 ALGO: sha224, time: 0.18301010131836 ALGO: sha256, time: 0.18301105499268 ALGO: sha384, time: 0.36102104187012 ALGO: sha512, time: 0.3610200881958 ALGO: ripemd128, time: 0.15900897979736 ALGO: ripemd160, time: 0.20701193809509 ALGO: ripemd256, time: 0.16500997543335 ALGO: ripemd320, time: 0.22501301765442 ALGO: whirlpool, time: 0.74204206466675 ALGO: tiger128,3, time: 0.12200689315796 ALGO: tiger160,3, time: 0.12100696563721 ALGO: tiger192,3, time: 0.12200713157654 ALGO: tiger128,4, time: 0.15700888633728 ALGO: tiger160,4, time: 0.15700888633728 ALGO: tiger192,4, time: 0.15600895881653 ALGO: snefru, time: 1.1520659923553 ALGO: snefru256, time: 1.151065826416 ALGO: gost, time: 0.48902797698975 ALGO: gost-crypto, time: 0.49202799797058 ALGO: adler32, time: 0.037002086639404 ALGO: crc32, time: 0.10300588607788 ALGO: crc32b, time: 0.093006134033203 ALGO: fnv132, time: 0.043002128601074 ALGO: fnv1a32, time: 0.045002937316895 ALGO: fnv164, time: 0.12800693511963 ALGO: fnv1a64, time: 0.12800693511963 ALGO: joaat, time: 0.070003986358643 ALGO: haval128,3, time: 0.12900686264038 ALGO: haval160,3, time: 0.12800693511963 ALGO: haval192,3, time: 0.12900805473328 ALGO: haval224,3, time: 0.12800693511963 ALGO: haval256,3, time:…

【CTI】We are looking for PHP/ASP project managers, PHP/ASP programmers, etc.

【CTI】We are looking for PHP/ASP project managers, PHP/ASP programmers, etc.

Company Profile      Hangzhou CTI Ruiou Technology Co., Ltd. is an innovative service enterprise under the Shenzhen Stock Exchange GEM listed company “CTI”, the company’s main business includes global chemical regulations consulting and technical services, supply chain information management, Database services, Internet information platforms, and e-commerce solutions for bulk commodity import and export. Founded in June 2009, the company is currently in the stage of entrepreneurial transformation, focusing on the development of entrepreneurial projects in the field of Internet applications, and urgently recruits IT talents with entrepreneurial enthusiasm and dreams to join. REO Technology has a wide range of cooperation channels at home and abroad, and has carried out various forms of cooperation with the European Chemicals Agency (ECHA), the European Chemical Industry Federation (CEFIC), the Belgian-Chinese Economic Commission, and the European Chamber of Commerce in China. , and has established close cooperative relations with China Petroleum and Chemical Industry Association, China Rubber Industry Association, China Chamber of Commerce for Import and Export of Foodstuffs, Native Animals, U.S. Department of Commerce, Thailand Ministry of Commerce, Singapore Chemical Industry Association, Malaysian Chemical Industry Association and other institutions, and also received business, Strong support from government agencies at all levels such as…

Use the automated script tool pyautogui to quickly fill in parameter names in postman/interface documents, etc.

Pain point : A dozen or even dozens of business fields in an interface are tested with postman , or when writing interface documents , It takes a long time to fill in these field names and is very mentally handicapped Copy and paste Solution :Use pyautogui tool to save repetitive work Platform :macbook pro 16-inch Notes& #xff1a; When using windows , shortcut keys are different from macos ; When running scripts , input method should be English When running the script , try not to move the mouse and keyboard The position of the mouse start clicking in the script is modified according to the size of the respective screen Each function of the script The input parameters are separated by spaces , because I use Alfred’s append copy function The renderings are as follows: The postman is as follows (for image size limitation , a bit blurry) : Interface document (used https://kl3s.w.eolinker.com/ ) variable name rendering ( because the animation is too large ,Change to only loop once,Please refresh to view): Description effect diagram of interface document parameters (because the animation is too large,changed to only cycle once,please refresh to view)& #xff1a; Installation method: pip install pyautogui The…

C# polymorphism learning, usage examples of virtual methods, abstract methods, interfaces, etc.

C# polymorphism learning, virtual method, abstract method, interface and other usage examples C# polymorphism learning, usage examples of virtual methods, abstract methods, interfaces, etc. 1. Polymorphism definition   Polymorphism in C# is a basic concept of OOP (Object-Oriented Programming), which allows an object to exhibit different behaviors in different situations to enhance code reusability and flexibility.   According to online tutorials, we learned that C# polymorphism is divided into two categories, static and dynamic. But in fact, C# does not have a strict distinction between static and dynamic polymorphism. The reason for such a division is for our convenience to understand. We use this thinking to roughly classify: Using function overloading or operator overloading method belongs to static polymorphism; Using virtual methods, abstract methods, interfaces, etc., belongs to dynamic polymorphism. Extension:In static polymorphism, the response of a function occurs at compile time. In dynamic polymorphism, the response of a function happens at runtime. What does that mean? In a static language, many polymorphic features can be determined at compile time, and the compiler can determine the calling method of the method according to the information of the data type. In dynamic languages, the determination of data types is usually carried out at…

Linux user management (2)—-modify user mode (usermod, sudo permissions, etc.)

Modifying the user mode can be achieved with the usermod command. 1. Usermod common command introduction: -a: Only used with -G to add user to affiliated group. -d: Modify the directory when the user logs in. For example, when ordinary users log in, they enter the pre-set home directory by default. Sometimes when you need to enter a more complicated path for the convenience of logging in, you can use this option to set When entering the directory. -g: Modify the group to which the user belongs. -G: Modify the additional group to which the user belongs; this option can be used when changing the user sudo permission. -s: Modify the shell version used by the user after logging in Second, sudo permissions Users can obtain sudo privileges in two ways 1. Modify the /etc/sudoers file and add the user name to the sudo permission group, for example 2. The second method is to modify the user’s affiliated group: Can be modified with usermod or gpasswd (1) Use usermod to modify $ sudo usermod -a -G sudo tt The modified result can be viewed in /etc/group, and you can see that the sudo column contains tt Files that may be…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索