I have 3 questions that will greatly help me with my project that I am stuck on, after much narrowing down these are the resulted questions arised from solutions:
-
Can I use one php file to change a variable value in another php file, can these values be read also from one php file to another?
-
How can I use crob job to change variable values within my php code?
-
Lastly, can cron read variable values in my php files??? for Example, if statements that will decide what to trigger and how to trigger when cron time comes?
I am a little new at cron and going deeper into php and need all the exeprtise help. I cant use any CURL or frameworks.
Please prevent the hijacking of my topic, the data I want is simple change $variable=1 in filenameA.php to $variable=2 using filenameB.php
This is not a very good practice, but it’s the simplest thing you can do:
You need three files:
my_script.php,my_cron_job.php, andmy_data.txt.In the script that control’s
$data(this is calledmy_cron_job.php):Running it will also create my_data.txt.
Then, in
my_script.php: