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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:49:37+00:00 2026-06-05T00:49:37+00:00

So just a general question: if i have a file structure like this where

  • 0

So just a general question: if i have a file structure like this where i have an index page in the root folder along with a scripts folder, and in the scripts folder there are two scripts one a JS which is referenced in the index page, and the other PHP which is referenced from the js script:

root-folder:
–> index.html
–> scripts/
—–> myscript.js
—–> myscript.php

how should I access the php script from the js script using a relative url?

would it be: ./myscript.php or ./scripts/myscript.php

in other words is the relative url from the index file or the js file. 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-05T00:49:39+00:00Added an answer on June 5, 2026 at 12:49 am

    Since the javascript is operating in the scope of the page, not its physical location, the URL to the PHP would include /scripts/ in the path name.

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

Sidebar

Related Questions

This is just a bit of a general question regading app/lib file sizes. When
just a general question, do you ALWAYS have to handle error? i was just
Just a general curiosity question. Why is this namespace System.Collections.Generic added by default in
This is more of a general question as I have found relatively little information
just had a general question about how to approach a certain problem I'm facing.
i just want to know a general information about this particular information. Any good
I just started using php arrays (and php in general) I have a code
i just create reading file feature. In general, what kind PHP class that usually
MSDN is a nice place to get vague, general information on this, with just
I have a general question about the design of JavaScript Libraries. I am trying

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.