Add remaining project files (exclude ignored folders)

This commit is contained in:
WD - Dev
2025-07-05 15:11:40 +07:00
parent a96eb2b958
commit b440b80882
4697 changed files with 1365702 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
const { exec } = require('child_process');
const path = require('path');
// Jalur ke executable PHP
const phpExecutablePath = '/www/server/php/74/bin/php'; // Jalur yang sesuai dengan sistem Anda
// Daftar jalur ke file PHP
const phpScriptPaths = [
path.join(__dirname, 'load_pesan.php'),
path.join(__dirname, 'create_link_flip.php')
];
// Fungsi untuk menjalankan file PHP
function runPhpScripts() {
phpScriptPaths.forEach((phpScriptPath) => {
console.log(`Running command: ${phpExecutablePath} ${phpScriptPath}`);
exec(`${phpExecutablePath} ${phpScriptPath}`, (error, stdout, stderr) => {
if (error) {
console.error(`Error executing PHP script ${phpScriptPath}: ${error.message}`);
return;
}
if (stderr) {
console.error(`PHP script ${phpScriptPath} stderr: ${stderr}`);
return;
}
console.log(`PHP script ${phpScriptPath} output: ${stdout}`);
});
});
}
// Jalankan PHP scripts segera dan kemudian setiap 5 detik
runPhpScripts();
setInterval(runPhpScripts, 5000);