Skip to content

Instantly share code, notes, and snippets.

@woodwardtw
Created August 19, 2022 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woodwardtw/77c2fd65605f63d0bb19c99c3cf7fb5d to your computer and use it in GitHub Desktop.
Save woodwardtw/77c2fd65605f63d0bb19c99c3cf7fb5d to your computer and use it in GitHub Desktop.
just a poc showing how the php stuff might get written around the csv data
# full path
data = open("../../test/test.php", "w")
phpheader = ["<?php \n", "defined( 'ABSPATH' ) || exit; \n", "$bar = '"]
data.writelines(phpheader)
# regular csv stuff to populate the variable
close = "';"
data.write(close)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment