在定义之前使用了tinymce

时间:2015-09-30 11:40:31

标签: javascript php html tinymce

我使用的librabry有问题。它告诉我在定义之前使用了tinmce。这个图书馆从文本区域创建了一个所见即所得的编辑器。但是现在它无法正常工作。

希望有人能帮助我解决这个问题! 谢谢!



tinymce.init({selector: 'textarea'});

<?php include "../includes/db.php"; ?>
<?php include "functions.php"; ?>
<?php ob_start(); ?>
<?php session_start(); ?>

<?php

    if(!isset($_SESSION['user_role'])){
        
        if($_SESSION['user_role'] !== 'admin'){
            
            header("Location: ../index.php");
        
        } 
    }

?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Welcome To Dashboard</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/sb-admin.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <!-- Google chart librabry voor google charts -->
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    
    <!-- tinymce wysiwyg editor voor posts -->
    <script src="http://tinymce.cachefly.net/4.2/tinymce.min.js"></script>
    
    <script src="js/scripts.js"></script>
    

</head>

<body>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

如果您使用的是Apache:

  

问题是由默认的Apache选项EnableSendfile引起的。您必须通过删除httpd.conf文件中的#字符将其关闭。

请参阅:TinyMCE-Installation: Windows specific Apache configuration

从:

#EnableSendfile off

为:

EnableSendfile off