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 6048297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:26:50+00:00 2026-05-23T07:26:50+00:00

I am new to Python and currently have to write a python program/script to

  • 0

I am new to Python and currently have to write a python program/script to be integrated inside PHP. Basically I have one stand-alone python program that will be executed through CRONTAB that grabs data from a remote device and exports the data to an XML file. I also have to write another python program/script to be include inside PHP to read the XML and echo/print the data onto the screen. So my question is that

  1. What is the difference between python program and script? Given my python program, I included #!/usr/bin/env python at the beginning of the file but I still cant execute it using ./scriptName.py

  2. How to include and run a python program/script inside the PHP file? Inside the python script, how to output the data using the same manner as echo in PHP? The include part in my PHP is:

    <td><p><img src="img/today.gif" alt="today" width="180" height="40" /></p>
        <?php include "monthphotos.php"; ?>
        <?php include "todayatcpp/index.php"; ?>
    </td>
    

I am new to beginner programmer so some of my questions can be obscure. Sorry!

  • 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-23T07:26:51+00:00Added an answer on May 23, 2026 at 7:26 am

    The only way you can run a python script inside of a PHP script is to use the exec call. With that you will be able to capture the output from the python script and be able to use it in PHP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that appends some rows to a table. One of the
I am really new to Python and I have been looking for an example
I'm new to python, and have a list of longs which I want to
This is an incredibly simple question (I'm new to Python). I basically want a
I'm currently learning Python using Zelle's Introductory text, and I'm trying to recreate one
I am new to python (and this site); I am trying to write a
I have one thread that inserts into the queueStream (not shown here) and FlowController
I have a Python script which uses Tkinter for the GUI. My little script
I have an Python ExcelDocument class that provides basic convenience methods for reading/writing/formatting Excel
I have a new web app that is packaged as a WAR as part

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.