PHP Format Fatal Error on Screen
The PHP fatal error on screen is one continuous line making it difficult to read. Use the following to format the error:
ini_set('error_prepend_string', '<pre>');
ini_set('error_append_string', '</pre>');
ini_set('display_errors', 1);
Insert the code in the doc root index.php
.
To wrap long text to screen width, use:
ini_set('error_prepend_string', '<pre style="white-space: pre-wrap;">');
ini_set('error_append_string', '</pre>');
ini_set('display_errors', 1);
HTML attributes to improve your users' two factor authentication experience
<input
type="text"
name="token"
id="token"
inputmode="numeric"
pattern="[0-9]*"
autocomplete="one-time-code"
/>
VS Code Essentials for PHP Development with Git Workflow
Set up for
- development and production servers
- local and remote git repo
- multiple coders
Required VS Code Extensions
- ftp-sync ver 0.3.3, do not use ver 0.3.9
- GitLens latest ver
- PHP Intelephense latest ver
ftp-sync setup
To ftp local changes to remote server for testing. The latest ver 0.3.9 has some problems, so downgrade to version to 0.3.3:
The json config:
- [vscode] Hit F1
- [vscode] Input: ftp-sync: Init
- [vscode] File: ftp-sync.json
{
"remotePat...
Update WAMP
Each component of WAMP: PHPMyAdmin, PHP, MySQL, Apache, Wampserver, etc. can be upgraded individually. Just download what you need to upgrade here. The windows executable is self-contained and will upgrade WAMP or its components without any fuss.
Configure VS Code for PHP Development Workflow
- [browser][windows] Download and install WampServer, save the application in the work folder (D:/Work/wamp64); if encounter error on missing VCRUNTIME140.dll, download it from MS, download either x64 or x86, install as admin; if still error after installing, then download the other file and install.
- [browser][windows]Download and install VS Code.
- [vscode] Configure PHP linting:
- File > Preferences > User Settings
- on the right window settings.json,...
Export CSV from Google Sheet
Open the sheet document in Google Drive.
File > Public to the web ... > Link tab
There are 2 dropdowns:
select the sheet
select .csv
Copy paste the generated URL in a browser. Sample URL:
https://docs.google.com/spreadsheets/d/[some key]/pub?gid=[some id]&single=true&output=csv