Programming
Coding
All languages I used/tried. Quickref here, no learning tools.
For bash scripting, see the sysadmin page
Web-oriented languages
HTML
- w3c HTML validator
Markup tool (link is by HTML input)
- Forms
checked="checked"
is the standart way to check an input checkbox.
- Misc
Links: to disable
Example: Disabled link
The link: <a href="" disabled="disabled">Disabled link</a>
The CSS:
<style>a[disabled] {
color: gray; /* optional but clearer for the reader */
pointer-events: none;
}</style>
PHP
Get the -local- path of current script
- With trailing slash
substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],'/')+1)
Result: C:/_rabbit.lu/it/
- Without trailing slash
substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],'/'))
Result: C:/_rabbit.lu/it
PHP + JS
Interpret PHP code inside a .js file. Works for CSS too.
- Create a .htaccess with
AddType application/x-httpd-php .js
- Source the .js file as usual
<script src="file.js"></script>
- Or with params
<script src="file.js?test=zobi"></script>
- PHP code is run in the javascript file like it would do in a .php file.
- If the PHP output is not valid javascript, it may break the rest of the script. The error should be spotted in the javascript console and the debug done by calling the .js file directly.
AHK
^ : Control
+ : Shift
! : Alt
<^>! : AltGr
# : WinKey
< : left key of pair (for Ctrl etc)
> : right key of pair
Navbar :: rabbit.lu / it /
$code.php
Last update: 14 June 2021 04:18:47
Hosting by OVH