Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

133
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda