Php 在tinymce编辑器中浏览图像时出现的问题

Php 在tinymce编辑器中浏览图像时出现的问题,php,image,upload,tinymce,Php,Image,Upload,Tinymce,我正在尝试在tinymce编辑器中实现照片上传选项。为此,我上传了最新版本的ajaxfilemanager。我只是把文件夹放在tinymce的插件文件夹下。并在插件文件夹下创建一个名为“上传”的文件夹。还要修改tinyMCE.initlike的代码 tinyMCE.init({ // General options mode : "textareas", elements : "ajaxfilemanager", theme : "advanced", plugins : "pa

我正在尝试在tinymce编辑器中实现照片上传选项。为此,我上传了最新版本的ajaxfilemanager。我只是把文件夹放在tinymce的插件文件夹下。并在插件文件夹下创建一个名为“上传”的文件夹。还要修改
tinyMCE.init
like的代码

tinyMCE.init({
// General options
  mode : "textareas",
  elements : "ajaxfilemanager",
  theme : "advanced",
  plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,paste,fullscreen,noneditable,contextmenu",
    theme_advanced_buttons1_add_before : "newdocument,separator",
    theme_advanced_buttons1_add : "fontselect,fontsizeselect",
    theme_advanced_buttons2_add : "separator,forecolor,backcolor,liststyle",
    theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,",
    theme_advanced_buttons3_add_before : "tablecontrols,separator",
    theme_advanced_buttons3_add : "flash,advhr,separator,fullscreen",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    extended_valid_elements : "hr[class|width|size|noshade]",
    file_browser_callback : "ajaxfilemanager",
    paste_use_dialog : false,
    theme_advanced_resizing : true,
    theme_advanced_resize_horizontal : true,
    apply_source_formatting : true,
    force_br_newlines : true,
    force_p_newlines : false,
    relative_urls : true,


    // Example content CSS (should be your site CSS)
    // using false to ensure that the default browser settings are used for best Accessibility
    // ACCESSIBILITY SETTINGS
    content_css : false,
    // Use browser preferred colors for dialogs.
    browser_preferred_colors : true,
    detect_highcontrast : true,

    // Drop lists for link/image/media/template dialogs
    template_external_list_url : "lists/template_list.js",
    external_link_list_url : "lists/link_list.js",
    external_image_list_url : "lists/image_list.js",
    media_external_list_url : "lists/media_list.js",

    // Style formats
    style_formats : [
     {title : 'Bold text', inline : 'b'},
     {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
     title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
     {title : 'Example 1', inline : 'span', classes : 'example1'},
     {title : 'Example 2', inline : 'span', classes : 'example2'},
     {title : 'Table styles'},
     {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
    ],

    // Replace values for the template plugin
    template_replace_values : {
     username : "Some User",
     staffid : "991234"
    }
    });
function ajaxfilemanager(field_name, url, type, win) {
    var ajaxfilemanagerurl = "../tinymce/jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php?editor=tinymce";
    switch (type) {
        case "image":
            break;
        case "media":
            break;
        case "flash":
            break;
        case "file":
            break;
        default:
            return false;
    }
    var fileBrowserWindow = new Array();
    fileBrowserWindow["file"] = ajaxfilemanagerurl;
    fileBrowserWindow["title"] = "Ajax File Manager";
    fileBrowserWindow["width"] = "782";
    fileBrowserWindow["height"] = "440";
    fileBrowserWindow["close_previous"] = "no";
    tinyMCE.openWindow(fileBrowserWindow, {
      window : win,
      input : field_name,
      resizable : "yes",
      inline : "yes",
      editor_id : tinyMCE.getWindowArg("editor_id")
    });

    return false;
}
我还修改了config.base.php文件,该文件位于
ajaxfilemanager/inc
文件夹下

define('CONFIG_SYS_DEFAULT_PATH', 'http://localhost/object/all/tinymce/jscripts/tiny_mce/plugins/uploaded/'); //accept relative path only
define('CONFIG_SYS_ROOT_PATH', 'http://localhost/object/all/tinymce/jscripts/tiny_mce/plugins/uploaded/');  //accept relative path only
但我无法打开浏览窗口。 你能指导我解决这个问题吗

我解决了一些js错误。现在我得到了图像弹出窗口,可以上传一些图像。但每当我试图获取图像URL时,它都会在图像URL fext字段中显示
undefined

现在,请帮助我如何继续。

您是否发现任何js错误?你能提供到你的页面的实时链接吗?是的,我在js中遇到了以下错误:错误:类型错误:tinyMCE.getWindowArg不是函数源文件:行:103我修改了我的问题。请检查。包括tinymce开发者版本,使用tiny_mce_dev.js而不是tiny_mce.js,使用firefug js错误应该会透露更多信息