Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6039739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:24:48+00:00 2026-05-23T06:24:48+00:00

I have 3 questions that will greatly help me with my project that I

  • 0

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:

  1. 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?

  2. How can I use crob job to change variable values within my php code?

  3. 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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:24:49+00:00Added an answer on May 23, 2026 at 6:24 am

    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, and my_data.txt.

    In the script that control’s $data (this is called my_cron_job.php):

    <?php
      $values = array(
                  "some_key" => "some_value",
                  "anything" => "you want"
                  );
    
      file_put_contents("my_data.txt",serialize($values));
    

    Running it will also create my_data.txt.

    Then, in my_script.php:

    <?php     
      $data = unserialize(file_get_contents("my_data.txt"));
      print_r($data);   //if you want to look at what you've got.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few questions that will help me understand things better if answered:
I have a list of questions that the user will iterate through, they can
I know that similar questions have been asked before, but I am very much
I have a relatively simple question. Will using PHP guarantee that a form is
I have a few questions that I hope clarity and facts can be fed
Given a set of questions that have linked survey and category id: > db.questions.find().toArray();
I know there are other questions that have similar issues, but I have read
This is a little different than the questions that have already been asked on
I realise that similar questions have been asked before however none of the solutions
I'm aware that similar questions have been answered here before: postscript - overlay one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.