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

  • Home
  • SEARCH
  • 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 8205207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:08:46+00:00 2026-06-07T08:08:46+00:00

i have a question when a .php file called as a javascript what dose

  • 0

i have a question
when a .php file called as a javascript what dose this mean? and when this is needed to be used ?

ex:

<head> 
<script src="dir/myphpfile.php" type="text/javascript"></script>
</head> 
  • 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-07T08:08:48+00:00Added an answer on June 7, 2026 at 8:08 am

    This means that the myphpfile.php would generate javascript code as output instead of HTML because that’s all that the web browser could understand in a script tag. It is useful in situations when you want to generate dnyamic javascript at runtime instead of statically coding it in a separate .js file. Think for example declaring a javascript variable containing the list of customers stored in a database on the server and making this javascript variable globally accessible.

    Another common example where this could be useful is to implement JSONP allowing cross domain AJAX requests.

    Yet another example is to use a php script that will combine and cache the output of multiple javascript files into one.

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

Sidebar

Related Questions

Possible Duplicate: Check if a variable is empty Simple PHP question: I have this
I have simple question. User supplies URL to my PHP script where I fetch
I am new to PHP, so I have a basic question. I have this
I have a file for a calendar made with javascript called calendar_db.js, in it
I have the following code: http://www.nomorepasting.com/getpaste.php?pasteid=22615 Which is called by the javascript mentioned in
I have this layout file called menuAdmin. I wish to, each time a given
Let say I have this code in a JS file called plus2.js: function plus2(n){
I have a script called at the end of an html page like this.
I have a question with php. I wanna generate a signature based on some
i have a few question on php db connection and hoping someone can answer

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.