Omitir navegación
Ampliar
  • Búsqueda avanzadaAbre un nuevo diálogo
    Ingrese los signos mas (+) o menos (-) en los términos de búsqueda para incluir o excluir la palabra requerida
    Consejos de búsqueda
    Filtrar por producto
    Filtrar por categoría
Using PHP function file_get_contents
ID de respuesta 7445   |   Revisado 05/01/2022

Can I use the PHP function file_get_contents() within my Customer Portal pages and custom PHP scripts?

Environment:

Customer Portal all versions

Resolution:

PHP file_get_contents is supported when reading the PHP input stream (OCI and legacy pods), in both Customer Portal (custom CP controllers) and custom PHP scripts, as follows:

file_get_contents('php://input')

Further, when using the above with custom scripts, it is important to use the primary vhost for the site interface in the URL used to access the script. 

Otherwise, on legacy pods, file_get_contents is supported as long as the file URL uses HTTP.  However, it is not supported on OCI pods, as those do not allow traffic over port 80 (HTTP) and the PHP build does not support file_get_contents using HTTPS.

Notificarme
La página se refrescará al enviar. Las entradas pendientes se perderán.