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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:19:15+00:00 2026-06-18T02:19:15+00:00

Here is my situation.Supposing I have a PHP file named as: myfunctions.php Is it

  • 0

Here is my situation.Supposing I have a PHP file named as:

myfunctions.php

Is it possible to read the contents of that PHP file (myfunctions.php) in another script using available PHP functions?

I’m using the following functions without success in reading this PHP file:

file_get_contents()
file()

It simply returned blank. One of the possible successful method was to read this PHP file as text file but I do not know how to do this..If someone has some other methods, please share. Ideally I want the output to be an array so the data I would like to obtain will be easily manipulated for use.

Thanks.

  • 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-06-18T02:19:17+00:00Added an answer on June 18, 2026 at 2:19 am

    If I were you, I will change the extension on the “myfunctions.php” to “myfunctions.txt” and use the theses functions

    file_get_contents()
    file()
    

    But I don’t know if you are allow to change the name of the document.

    file() - Reads entire file into an array
    fgets() - Gets line from file pointer
    fread() - Binary-safe file read
    readfile() - Outputs a file
    file_put_contents() - Write a string to a file
    stream_get_contents() - Reads remainder of a stream into a string
    stream_context_create() - Creates a stream context
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an situation here that looks very like a SELECT N+1 from the
So here the situation. I have multiple strings that begin and end with a
I have a situation here: I have a .eap file and i have a
Very odd situation here. I'm trying to launch a .application file using Response.Redirect. In
I have a unique problem/situation here. Trying to make it as simple as possible.
I have a tricky CSS situation here. Basically I have nested span tags that
The situation here is that I have a web sql database with 8 tables
My situation here is that, I have asp Imagebuttons on my web page which
I have a situation here i am taking input from user using scanf can
I have a situation here: I have a page which is using to show

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.