Running a Python script
All posts by
Local time
Convert UTC to the timezone of the site
Null row setting
Use NULL, e.g.
File upload forms
SEE PHP SECTION PAGE ON FILE UPLOADS: /cloud/category/php/forms/file-uploads
.2 Create new VS Code web project
Create the workspace This is the approach we use, to ensure that the .vscode folder with config settings, sftp logging details, etc is not part of the httpdocs\ (or similar) folder that is published on the web server. In VS Code open the folder that CONTAINS your local ‘httpdocs\’ (or whatever you call it) folder […]
Styling admin view
Creating a stylesheet that will be used when viewing the site admin side (e.g. editing a post) In functions.php: Create a file called style-admin.css and store in your theme’s root folder (along with style.css).Some example content:
SFTP by Natizyskunk
For which extensions we install see here. Documentation https://github.com/Natizyskunk/vscode-sftp/wiki Setup keyboard shortcuts VSCode > File > Preferences > Keyboard Shortcuts > SFTP: Upload Active File > Add shortcut: CTRL+SHIFT+U Configure new connection Ctrl+Shift+P to open command palette > SFTP: config A basic configuration file will be created named sftp.json under the .vscode directory. Edit with […]
debug.log file
Enabling the debug.log file Edit the wp-config.php file: You’ll now get the same output, but written to the file instead of shown to users at the top of the page. Viewing the file This file will be written in: /wp-content/ directory Open this file using SSH or your FTP client to view the debug reports.
File download from a string
Cause browser to prompt user to save file you will create from a string HTML PHP Basic example: An example using WordPress:
POST Files
Handling a file passed as a POST request