Editor

Editor

IvanwIvanw Posts: 7Questions: 0Answers: 0
edited May 2012 in Plug-ins
Hi Allen. i thought you would like to know that the Generator application on the editor site is spitting out db.php files without the enclosing <?php and ?> characters. Also I don't know if it is intentional but the array sql_details is not declared users have to create that themselves.

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    That's very odd - I've just tried is and get the following:

    [code]
    <?php

    /*
    * DB connection script for Editor
    * Automatically generated by http://editor.datatables.net/generator
    */

    error_reporting(E_ALL);
    ini_set('display_errors', '1');

    /*
    * Edit the following with your database connection options
    */
    $sql_details = array(
    "user" => "",
    "pass" => "",
    "host" => "",
    "db" => ""
    );

    // PDO connection
    $db = new PDO(
    "mysql:host={$sql_details['host']};dbname={$sql_details['db']}",
    $sql_details['user'],
    $sql_details['pass'],
    array(
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
    )
    );

    include( "include/DTEditor.mysql.pdo.class.php" );
    [/code]

    which is what I would expect. No closing tag, but the include file doesn't need one.

    I'm not sure what would be causing a difference between what you are seeing and what I am. What browser / platform / details are you using for the form?

    Allan
  • IvanwIvanw Posts: 7Questions: 0Answers: 0
    I just tried a very basic 2 db with 2 text fields and the mysql_* option.

    Using windows 7 with the latest version of Chrome.
This discussion has been closed.