1

我无法弄清楚为什么我的表格没有出现在我的网站上。这是错误消息:

“警告:require_once(/hermes/bosnaweb03a/b302/ipw.proliter/public_html/411tech/newsite):无法打开流:/hermes/bosnaweb03a/b302/ipw.proliter/public_html/411tech/newsite中没有这样的文件或目录/components/com_chronocontact/chronocontact.php 在第 17 行致命错误:require_once(): Failed opening required '' (include_path='.:/usr/local/lib/php-5.3.13/lib/php') in /hermes /bosnaweb03a/b302/ipw.proliter/public_html/411tech/newsite/components/com_chronocontact/chronocontact.php 在第 17 行

这是我的 chronocontact.php 表单

<?php
  /**
   * CHRONOFORMS version 3.1
   * Copyright (c) 2006 Chrono_Man, ChronoEngine.com. All rights reserved.
   * Author: Chrono_Man (ChronoEngine.com)
   * See readme.html.
   * @license       GNU/GPL
   * Visit http://www.ChronoEngine.com for regular update and information.
   **/

  /* ensure that this file is called by another file */
  defined('_JEXEC') or die('Restricted access');

  /**
   * Load the HTML class
   */
  require_once( JApplicationHelper::getPath( 'front_html' ) );
  require_once( JApplicationHelper::getPath( 'class' ) );

  require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
  require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
  $mainframe =& JFactory::getApplication('site');
  $mainframe->initialise();

  //load chronoforms classes
  require_once( JPATH_COMPONENT.DS.'libraries'.DS.'chronoform.php');
  require_once( JPATH_COMPONENT.DS.'libraries'.DS.'mails.php');
  require_once( JPATH_COMPONENT.DS.'libraries'.DS.'customcode.php');
  require_once( JPATH_COMPONENT.DS.'libraries'.DS.'chronoformuploads.php');
  require_once( JPATH_COMPONENT.DS.'libraries'.DS.'plugins.php');


  jimport( 'joomla.application.component.controller' );
  global $mainframe;
  if(JRequest::getVar('chronoformname')){
    JRequest::setVar('chronoformname', preg_replace('/[^A-Za-z0-9_]/', '', JRequest::getVar('chronoformname')));
  }
  $formname = JRequest::getVar('chronoformname');
  if ( !$formname ) {
    $params =& $mainframe->getPageParameters('com_chronocontact');
    $formname = $params->get('formname');
  }

  $MyForm =& CFChronoForm::getInstance($formname);

  if(!$MyForm->formrow->id){
    echo "There is no form with this name or may be the form is unpublished, Please check the form and the url and the form management";
    return;
  }

  if($MyForm->formparams('dbconnection') == "Yes"){
    eval ("?>".$MyForm->formrow->dbclasses);
  }

  $posted = JRequest::get( 'post' , JREQUEST_ALLOWRAW );
  /**
   * Main switch statement
   */
  switch( $task ) {
    case 'send':
      uploadandmail($formname);
      break;
    case 'extra':
      doextratask($formname);
      break;
    default:
      showform($formname, $posted);
      break;
    }
  /**
   * End of main page
   *
   */

  /**
   * Display the form for entry
   *
   */
  function showform($formname, $posted)
  {
    global $mainframe;
    $database =& JFactory::getDBO();

    $MyForm =& CFChronoForm::getInstance($formname);
    $MyForm->showForm($formname, $posted);
    `enter code here` //HTML_ChronoContact::showform( $MyForm->formrow, $posted);
  }

  /**
   * Respond to a submitted form
   *
   */
  function uploadandmail($formname)
  {
    global $mainframe;
    $database =& JFactory::getDBO();
    $posted = JRequest::get( 'post' , JREQUEST_ALLOWRAW );

    //Load Chronoforms Classes
    $MyForm =& CFChronoForm::getInstance($formname);
    $MyFormData = $MyForm->getForm(JRequest::getVar( 'chronoformname'));
    if($MyFormData){
      //fine
    }else{
      $mainframe->enqueueMessage('Error processing this form, form was not loaded!');
      return;
    }

    // Block SPAM through the submit URL
    if((!JRequest::checkToken()) && $MyForm->formparams('checkToken', 1))
    {
      echo "You are not allowed to access this URL";
      return;
    }
    if ( empty($posted) ) {
      echo "You are not allowed to access this URL directly, POST array is empty";
      return;
    }   

    if(JRequest::getVar('action') == 'extra'){
      $extraid = JRequest::getVar( 'extraid');
      $MyForm->doExtra($MyForm->formrow->name, $extraid, $posted);
    }

    $MyForm->submitForm($MyForm->formrow->name, $posted, $MyForm->formparams('useCurrent', false));
  }

  function doextratask($formname){
    global $mainframe;
    $database =& JFactory::getDBO();
    $posted = JRequest::get( 'post' , JREQUEST_ALLOWRAW );

    $MyForm =& CFChronoForm::getInstance($formname);
    $extraid = JRequest::getVar( 'extraid');
    $MyForm->doExtra($formname, $extraid, $posted);
  }
?>
4

1 回答 1

1

您正在运行看起来应该在 Joomla 上正确运行的 ChronoForms 版本 3!v1.5。它不会在更高版本的 Joomla! 上运行。

第 17 行是标准的 Joomla!正在加载此文件的行 /components/com_chronocontact/chronocontact.html.php

如果您的安装中不存在该文件,则会导致此错误。

如果它丢失了,那么最可能的原因是您的主机在您的站点上运行了病毒扫描并删除了可能危险的文件 - 它是完全安全的,但有一些代码会导致误报。您应该要求他们将其列入白名单,然后替换安装包中的文件。

于 2015-03-26T23:25:53.227 回答