سؤال

I require a cron job to open and export a table from my DB.

My web-host's control panel has a page for cron tasks. It requires a script to run.

I'm a .PHP & SQL guy, have never written a .CGI Script.

I would appreciate any guidance on this matter, before I waste time. Is it even possible to run SQL commands from a .CGI script?

هل كانت مفيدة؟

المحلول

Things that you have to take care:

  1. $_SERVER, $_GET, $_POST... arrays will be empty or undefined.
  2. The variables environnement will be minimalist in a cron job

There is no problem to run a CGI script.

You can also try to execute it on command line.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top