Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
change return fetch directory

I am trying to understand why I can't change return fetch directory to my /home direcotory rather tahn public_html :

 <script src="https://www.paypal.com/sdk/js?client-id=test&currency=USD"></script>

    <script>
        // Render the PayPal button into #paypal-button-container
        paypal.Buttons({

            // Call your server to set up the transaction
            createOrder: function(data, actions) {
                return fetch('/home/mysite/public_html/checkfetch.php, {
                    method: 'post'
                }).then(function(res) {
                    return res.json();
                }).then(function(orderData) {
                    return orderData.id;
                });
            },

It works when I make like above but what I need is not /home/mysite/public_html/checkfetch.php but /home/checkfetch.php

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Where is this hosted? Whatever is accessible in a web browser on that host (not a local file path) is what can be used for fetch. Establish valid route paths on your server, and use those. Nothing else.

public_html is an abnormal thing to have included in a web path. Normally such a folder indicates the filesystem root of where web paths begin from.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!