How to use the php/php.ini function in php

To help you get started, we’ve selected a few php examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github juicyfx / now-builders / src / php-lib / v7.2 / index.js View on Github external
async function getFiles() {
  // Lookup for PHP bins, modules and shared libs
  const files = {
    ...await glob('php/**', __dirname),
    ...await glob('lib/**', __dirname),
  };

  // Replace paths in php.ini file
  const phpini = await FileBlob.fromStream({
    stream: files['php/php.ini'].toStream(),
  });

  phpini.data = phpini.data
    .toString()
    .replace(/\/opt\/now\/modules/g, '/var/task/php/modules');
  files['php/php.ini'] = phpini;

  return files;
}
github juicyfx / now-builders / src / php-lib / v7.2 / index.js View on Github external
async function getFiles() {
  // Lookup for PHP bins, modules and shared libs
  const files = {
    ...await glob('php/**', __dirname),
    ...await glob('lib/**', __dirname),
  };

  // Replace paths in php.ini file
  const phpini = await FileBlob.fromStream({
    stream: files['php/php.ini'].toStream(),
  });

  phpini.data = phpini.data
    .toString()
    .replace(/\/opt\/now\/modules/g, '/var/task/php/modules');
  files['php/php.ini'] = phpini;

  return files;
}

php

Allows you to run PHP code in Node.js in various ways.

CC-BY-4.0
Latest version published 5 months ago

Package Health Score

73 / 100
Full package analysis