Foros del Web » Programando para Internet » PHP »

Problema con un script...

Estas en el tema de Problema con un script... en el foro de PHP en Foros del Web. Hola, puse un script para enviar formularios vía email, el caso es que al hacer un include en otra de mis páginas para mostar el ...
  #1 (permalink)  
Antiguo 12/10/2006, 08:37
Avatar de dogcat  
Fecha de Ingreso: diciembre-2003
Ubicación: Alicante
Mensajes: 325
Antigüedad: 20 años, 3 meses
Puntos: 2
Problema con un script...

Hola, puse un script para enviar formularios vía email, el caso es que al hacer un include en otra de mis páginas para mostar el formulario me da el siguiente error:

Parse error: parse error, unexpected T_STRING in http://www.hiphopyaik.com/ArteLive/contacto/index.php on line 1

Cita:
<?php

/************************************************** ***
** Title........: Form Mail Script
** Filename.....: index.php
** Author.......: Ralf Stadtaus
** Homepage.....: http://www.gentlesource.com/
** Notes........: This file contains the configuration
** Last changed.:
** Last change..:
************************************************** ***/

/************************************************** ***
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
** OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
** LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND
** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
** OR OTHER LIABILITY, WHETHER IN AN ACTION OF
** CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
** OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
** OTHER DEALINGS IN THE SOFTWARE.
**
************************************************** ***/




/************************************************** ***
** Script configuration - for a documentation of the
** following variables please take a look at the
** documentation file in the 'docu' directory.
************************************************** ***/
$script_root = './';

$referring_server = ''; // Example: $referring_server = 'artelive.es, www.artelive.es';

$language = 'es'; // (see folder 'languages')

$ip_banlist = '';

$ip_address_count = '0';
$ip_address_duration = '48';

$show_limit_errors = 'yes'; // (yes, no)

$log_messages = 'no'; // (yes, no)

$text_wrap = '65';

$show_error_messages = 'no';

$attachment = 'no'; // (yes, no) -- make folder "temp" writable with: chmod 777 temp
$attachment_files = 'jpg, gif,png, zip, txt, pdf, doc, ppt, tif, bmp, mdb, xls, txt';
$attachment_size = 9000000;

$path['logfile'] = $script_root . 'logfile/logfile.txt';
$path['templates'] = $script_root . 'templates/';

$file['default_html'] = 'form.tpl.html';
$file['default_mail'] = 'mail.tpl.txt';




/************************************************** ***
** Add further words, text, variables and stuff
** that you want to appear in the templates here.
** The values are displayed in the HTML output and
** the e-mail.
************************************************** ***/
$add_text = array(
'txt_additional' => 'Additional', // {txt_additional}
'txt_more' => 'More' // {txt_more}

);




/************************************************** ***
** Do not edit below this line - Ende der Einstellungen
************************************************** ***/














/************************************************** ***
** Send safety signal to included files
************************************************** ***/
define('IN_SCRIPT', 'true');




/************************************************** ***
** Load formmail script code
************************************************** ***/
include($script_root . 'inc/formmail.inc.php');




?>
A ver si alguien puede echarme una mano... GRACIAS!
  #2 (permalink)  
Antiguo 12/10/2006, 09:24
Avatar de the_scorpion  
Fecha de Ingreso: mayo-2006
Ubicación: Cuba
Mensajes: 696
Antigüedad: 17 años, 10 meses
Puntos: 3
Hola

pregunto
- pero el script sin hacer el include te funciona bien.

digo
- si haces un include a este archivo es cuando te da el error.

A la verdad que no te entiendo muy bien.
__________________
Que hablen mal de uno es espantoso. Pero hay algo peor: que no hablen.
Quien hace, puede equivocarse. Quien nada hace, ya está equivocado".
  #3 (permalink)  
Antiguo 12/10/2006, 11:18
Avatar de dogcat  
Fecha de Ingreso: diciembre-2003
Ubicación: Alicante
Mensajes: 325
Antigüedad: 20 años, 3 meses
Puntos: 2
Hola, el script va bien el error me lo da en http://www.hiphopyaik.com/ArteLive/formulario.php

Gracias.
  #4 (permalink)  
Antiguo 12/10/2006, 12:44
Avatar de the_scorpion  
Fecha de Ingreso: mayo-2006
Ubicación: Cuba
Mensajes: 696
Antigüedad: 17 años, 10 meses
Puntos: 3
pero creo que lo unico que tienes que hacer es dentro de formulario.php
incluir
<?
include ("contacto/index.php");
?>

pd: claro que dentro de contacto ha de estar todo los script con las carpetas que mencionas en tu primer mensaje

veamos que dicen los demas aquí.
__________________
Que hablen mal de uno es espantoso. Pero hay algo peor: que no hablen.
Quien hace, puede equivocarse. Quien nada hace, ya está equivocado".
  #5 (permalink)  
Antiguo 12/10/2006, 13:52
Avatar de dogcat  
Fecha de Ingreso: diciembre-2003
Ubicación: Alicante
Mensajes: 325
Antigüedad: 20 años, 3 meses
Puntos: 2
Gracias, acabo de hacer lo que me dijiste pero ahora me sale el siguiente error:

Warning: main(./inc/formmail.inc.php): failed to open stream: No such file or directory in /home/gallo/domains/hiphopyaik.com/public_html/ArteLive/contacto/index.php on line 111

Warning: main(): Failed opening './inc/formmail.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/gallo/domains/hiphopyaik.com/public_html/ArteLive/contacto/index.php on line 111

En: http://www.hiphopyaik.com/ArteLive/formulario.php
  #6 (permalink)  
Antiguo 13/10/2006, 04:34
Avatar de dogcat  
Fecha de Ingreso: diciembre-2003
Ubicación: Alicante
Mensajes: 325
Antigüedad: 20 años, 3 meses
Puntos: 2
Solucionado, Gracias.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:38.