如何设置fckeditor的图像路径?

如何设置fckeditor的图像路径?,fckeditor,Fckeditor,我正在为PHP使用fckeditor。我已经为图像上传设置了一个绝对路径。我可以上传图像,但无法使用上传的图像。有人能帮我找到我的问题吗 以下是我在config.php文件中更改的代码: // Path to user files relative to the document root. $Config['UserFilesPath'] = '/userfiles/' ; // Fill the following value it you prefer to specify the ab

我正在为PHP使用fckeditor。我已经为图像上传设置了一个绝对路径。我可以上传图像,但无法使用上传的图像。有人能帮我找到我的问题吗

以下是我在config.php文件中更改的代码:

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/var/www/host/mysite//userfiles/' ;

检查文件夹的权限

检查文件夹的权限

在谷歌上搜索了一整天后,我刚刚解决了这个令人沮丧的问题

解决办法是。寻找:

返回完整URL 您可以将文件浏览器配置为将完整URL返回到FCKeditor,如http://www.example.com/userfiles/,而不是绝对URL,如/userfiles/。为此,必须配置连接器,并结合UserFilePath和UserFileAbsolutePath设置:


UserFilePath:在这里包括用户文件目录的完整URL。例如,将其设置为http://www.example.com/userfiles/.

UserFilesAbsolutePath:在此处包括到达上述URL目录的服务器路径。例如,在Windows环境中,可以使用类似于C:/inetpub/mysite/userfiles/的内容,而在Linux上,可以使用类似于/usr/me/public\u html/mysite/userfiles/的内容

只需将上述设置调整到安装值,文件浏览器就会开始将完整URL返回到编辑器


在谷歌上搜索了一整天之后,我刚刚解决了这个令人沮丧的问题

解决办法是。寻找:

返回完整URL 您可以将文件浏览器配置为将完整URL返回到FCKeditor,如http://www.example.com/userfiles/,而不是绝对URL,如/userfiles/。为此,必须配置连接器,并结合UserFilePath和UserFileAbsolutePath设置:


UserFilePath:在这里包括用户文件目录的完整URL。例如,将其设置为http://www.example.com/userfiles/.

UserFilesAbsolutePath:在此处包括到达上述URL目录的服务器路径。例如,在Windows环境中,可以使用类似于C:/inetpub/mysite/userfiles/的内容,而在Linux上,可以使用类似于/usr/me/public\u html/mysite/userfiles/的内容

只需将上述设置调整到安装值,文件浏览器就会开始将完整URL返回到编辑器

对于您的本地主机:

$Config['UserFilesPath'] = 'http://localhost/mywebsite/userfiles/' ;
$Config['UserFilesAbsolutePath'] = 'C:\\wamp\www\\mywebsite\\userfiles\\' ;
为了从那里获取图像,请使用:

$path = 'http://localhost/mywebsite/userfiles/image/myimage.jpg';
现在,对于您的web服务器:

    $Config['UserFilesPath'] = 'http://localhost/mywebsite/userfiles/' ; // if your webserver named localhost as mine
$Config['UserFilesAbsolutePath'] = '/var/www/vhosts/mywebsite.com/httpdocs/' ;
并且图像路径与上面相同。

对于您的本地主机:

$Config['UserFilesPath'] = 'http://localhost/mywebsite/userfiles/' ;
$Config['UserFilesAbsolutePath'] = 'C:\\wamp\www\\mywebsite\\userfiles\\' ;
为了从那里获取图像,请使用:

$path = 'http://localhost/mywebsite/userfiles/image/myimage.jpg';
现在,对于您的web服务器:

    $Config['UserFilesPath'] = 'http://localhost/mywebsite/userfiles/' ; // if your webserver named localhost as mine
$Config['UserFilesAbsolutePath'] = '/var/www/vhosts/mywebsite.com/httpdocs/' ;
图像路径与上面相同。

完整主题:FCK editor 2.x:使用单个FCKeditor将$Config['UserFilePath']以安全的方式完全动态,将文件/图像/视频上载到不同的文件夹中,用于不同的应用程序

这可以通过多种方式实现。我正在解释一个过程,我根据我的php应用程序的代码结构应用了这个过程。对于不同的应用程序,我遵循相同的代码结构/框架,每个应用程序都是我服务器中的一个子文件夹。因此,在逻辑上需要使用一个FCKeditor,并以某种方式对其进行配置,以使其能够对所有应用程序正常工作。FCKeditor的内容部分正常。它可以很容易地被来自单个FCKeditor组件的不同应用程序或项目重用。但问题出现在文件上传上,比如图像、视频或任何其他文档。为了使其适用于不同的项目,必须将文件上载到不同项目的separe文件夹中。对于$Config['userfilepath']必须配置为动态文件夹路径,这意味着每个项目的文件夹路径不同,但在同一位置调用相同的FCKeditor组件。我正在一步一步地解释一些不同的过程。那些在FCKeditor 2.5.1版和VersionBuild 17566版中对我起到了很好的作用,我希望它们也能对其他人起到作用。如果它不适用于其他开发人员,那么他们可能需要根据项目代码结构和文件夹写入权限以及FCKeditor版本在这些过程中进行一些调整

fckeditor\editor\filemanager\connectors\phpconfig.php文件中的1

追求全局$Config;$Config['Enabled']=false; i如果需要依赖于会话的安全方法:仅用于单个站点设置:即,每个项目域或子域有一个FCKeditor,而不是多个项目有一个FCKeditor,请放置以下代码:

if(!isset($_SESSION)){
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
if(isset($_REQUEST['param_project_to_fck']) && $_REQUEST['param_project_to_fck']!=""){ //base64 encoded relative folder path of the project corresponding to the webroot; should be like "/project/folder/path/" before encoding 
$relative_path=base64_decode($_REQUEST['param_project_to_fck']);
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;
注意:此处,$\u SESSION['SESSION\u SERVER\u RELATIVEPATH']:对应于webroot的项目的相对文件夹路径;应类似于/project/folder/path/并在会话启动的项目中的公共文件中设置此会话变量。项目中应该有一个configurations/configuration.php作为配置文件。如果名称或路径不同,则必须在此处放置相应的路径,而不是configurations/configuration.php

如果你想 将单个FCKeditor组件用于表示为不同子文件夹的不同项目,并采用会话相关安全方式(假定不同项目的会话名称不同),以区分它们在单个服务器中的会话。但是,如果项目表示为子域或不同的域,那么就必须使用下面提供的会话独立方式iii,尽管它是不安全的,但这是行不通的。放置此代码:

if(!isset($_SESSION)){
session_name($_REQUEST['param_project_to_fck']); 
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
请阅读上一点,即第一点末尾的注意事项

iii如果希望为不同的项目使用单个FCKeditor组件,则表示不同的子文件夹以及子域或域,尽管它不完全安全。放置此代码:

if(!isset($_SESSION)){
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
if(isset($_REQUEST['param_project_to_fck']) && $_REQUEST['param_project_to_fck']!=""){ //base64 encoded relative folder path of the project corresponding to the webroot; should be like "/project/folder/path/" before encoding 
$relative_path=base64_decode($_REQUEST['param_project_to_fck']);
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;
请阅读第一点末尾的注意事项

B此后,对于您选择的任何案例,请查找以下代码:

if(!isset($_SESSION)){
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
if(isset($_REQUEST['param_project_to_fck']) && $_REQUEST['param_project_to_fck']!=""){ //base64 encoded relative folder path of the project corresponding to the webroot; should be like "/project/folder/path/" before encoding 
$relative_path=base64_decode($_REQUEST['param_project_to_fck']);
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;
并替换以下代码:

if(isset($SERVER_RELATIVEPATH) &&  $SERVER_RELATIVEPATH==$relative_path) { //to make it relatively secure so that hackers can not create any upload folder automatcally in the server, using a direct link and can not upload files there 
$Config['Enabled'] = true ;
$file_upload_relative_path=$SERVER_RELATIVEPATH;
}else{
$Config['Enabled'] = false ;
exit();
}
// Path to user files relative to the document root.
//$Config['UserFilesPath'] = '/userfiles/' ;
//$Config['UserFilesPath'] = $file_upload_relative_path.'userfiles/' ;
$Config['UserFilesPath'] = '/userfiles'.$file_upload_relative_path;
此处$SERVER_RELATIVEPATH是相对路径,必须在前面包含的项目配置文件中进行设置

在这里,您可以使用$file\u upload\u relative\u path变量将$Config['UserFilesPath']与任何其他动态文件夹路径一起设置,由于项目根文件夹0755权限与其下的userfiles文件夹之间存在文件夹用户权限冲突,根据FCKeditor编码,userfiles下的子文件夹应为0777,因此不允许上载这些文件夹中的文件。因此,我在服务器webroot上创建了一个文件夹userfiles,位于项目根文件夹之外,并将权限设置为0777,使用$config设置的代码如下:

$Config['UserFilesPath'] = '/userfiles'.$file_upload_relative_path; 
但是,如果您对案例中项目子文件夹的写入权限没有问题,则可以使用在上一代码段中注释掉的上一行:

$Config['UserFilesPath'] = $file_upload_relative_path.'userfiles/' ;
注意,您必须注释掉现有的$Config['UserFilesPath']='/userfiles/';在这个文件中,如果它存在于文件的其他位置,则替换它或简单地注释掉它

2如果您选择1 a ii或iii方法,则打开 fckeditor\editor\filemanager\browser\default\browser.html文件

搜索此行:var sConnUrl=GetUrlParam'Connector'

将以下命令放在该行之后:

var param_project_to_fck = GetUrlParam( 'param_project_to_fck' ) ; 
现在,搜索此行:sUrl+='&CurrentFolder='+encodeURIComponent this.CurrentFolder

将此命令放在该行之后:

sUrl += '&param_project_to_fck=' + param_project_to_fck ; 
sUrl += '&param_project_to_fck='+window.parent.param_project_to_fck;
b现在,打开ckeditor\editor\filemanager\browser\default\frmupload.html文件

搜索此行它应位于SetCurrentFolder函数中:

sUrl += '&CurrentFolder=' + encodeURIComponent( folderPath ) ;
将此命令放在该行之后:

sUrl += '&param_project_to_fck=' + param_project_to_fck ; 
sUrl += '&param_project_to_fck='+window.parent.param_project_to_fck;
3现在,如果要在项目中显示FCKeditor,必须先将这些行放在相应的php文件/页面中:

include_once(Absolute/Folder/path/for/FCKeditor/."fckeditor/fckeditor.php") ; 
$oFCKeditor = new FCKeditor(Field_name_for_editor_content_area) ;
$oFCKeditor->BasePath = http_full_path_for_FCKeditor_location.'fckeditor/' ;
$oFCKeditor->Height = 400;
$oFCKeditor->Width = 600;
$oFCKeditor->Value =Your_desired_content_to_show_in_editor;
$oFCKeditor->Create() ; 
现在,如果您选择1 a ii或iii方法,则将以下代码段放在该行之前:$oFCKeditor->Create

$oFCKeditor->Config["LinkBrowserURL"] = ($oFCKeditor->BasePath)."editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php&param_project_to_fck=".base64_encode($SERVER_RELATIVEPATH);
$oFCKeditor->Config["ImageBrowserURL"] = ($oFCKeditor->BasePath)."editor/filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/php/connector.php&param_project_to_fck=".base64_encode($SERVER_RELATIVEPATH);
$oFCKeditor->Config["FlashBrowserURL"] = ($oFCKeditor->BasePath)."editor/filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/php/connector.php&param_project_to_fck=".base64_encode($SERVER_RELATIVEPATH);
b如果您选择1 a ii方法,那么在上述代码段中,只需将所有文本:base64\u encode$SERVER\u RELATIVEPATH替换为以下文本:base64\u encodesession\u name

您已经完成了。

完整主题:FCK editor 2.x:使用单个FCKeditor将$Config['UserFilePath']以安全的方式完全动态化,从而将文件/图像/视频上载到不同的文件夹中,用于不同的应用程序

这可以通过多种方式实现。我正在解释一个过程,我根据我的php应用程序的代码结构应用了这个过程。对于不同的应用程序,我遵循相同的代码结构/框架,每个应用程序都是我服务器中的一个子文件夹。因此,在逻辑上需要使用一个FCKeditor,并以某种方式对其进行配置,以使其能够对所有应用程序正常工作。FCKeditor的内容部分正常。它可以很容易地被来自单个FCKeditor组件的不同应用程序或项目重用。但问题出现在文件上传上,比如图像、视频或任何其他文档。为了使其适用于不同的项目,必须将文件上载到不同项目的separe文件夹中。对于$Config['userfilepath']必须配置为动态文件夹路径,这意味着每个项目的文件夹路径不同,但在同一位置调用相同的FCKeditor组件。我正在一步一步地解释一些不同的过程。那些在FCKeditor 2.5.1版和VersionBuild 17566版中对我起到了很好的作用,我希望它们也能对其他人起到作用。如果它不适用于其他开发人员,那么他们可能需要根据项目代码结构和文件夹写入权限以及FCKeditor版本在这些过程中进行一些调整

fckeditor\editor\filemanager\connectors\phpconfig.php文件中的1

追求全局$Config;$Config['Enabled']=false; i如果需要依赖于会话的安全方法:仅用于单个站点设置:即,每个项目域或子域有一个FCKeditor,而不是多个项目有一个FCKeditor,请放置以下代码:

if(!isset($_SESSION)){
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
if(isset($_REQUEST['param_project_to_fck']) && $_REQUEST['param_project_to_fck']!=""){ //base64 encoded relative folder path of the project corresponding to the webroot; should be like "/project/folder/path/" before encoding 
$relative_path=base64_decode($_REQUEST['param_project_to_fck']);
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;
注意:此处,$\u SESSION['SESSION\u SERVER\u RELATIVEPATH']:对应于webroot的项目的相对文件夹路径;应该像/pr 并在启动会话的项目中的公共文件中设置此会话变量。项目中应该有一个configurations/configuration.php作为配置文件。如果名称或路径不同,则必须在此处放置相应的路径,而不是configurations/configuration.php

ii如果希望为不同的项目使用单个FCKeditor组件(表示为不同的子文件夹),并采用会话相关的安全方式(假定不同项目的会话名称不同),以在单个服务器中区分其会话。但是,如果项目表示为子域或不同的域,那么就必须使用下面提供的会话独立方式iii,尽管它是不安全的,但这是行不通的。放置此代码:

if(!isset($_SESSION)){
session_name($_REQUEST['param_project_to_fck']); 
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
请阅读上一点,即第一点末尾的注意事项

iii如果希望为不同的项目使用单个FCKeditor组件,则表示不同的子文件夹以及子域或域,尽管它不完全安全。放置此代码:

if(!isset($_SESSION)){
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
if(isset($_REQUEST['param_project_to_fck']) && $_REQUEST['param_project_to_fck']!=""){ //base64 encoded relative folder path of the project corresponding to the webroot; should be like "/project/folder/path/" before encoding 
$relative_path=base64_decode($_REQUEST['param_project_to_fck']);
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;
请阅读第一点末尾的注意事项

B此后,对于您选择的任何案例,请查找以下代码:

if(!isset($_SESSION)){
session_start(); 
}

if(isset($_SESSION['SESSION_SERVER_RELATIVEPATH']) && $_SESSION['SESSION_SERVER_RELATIVEPATH']!="") { 
$relative_path=$_SESSION['SESSION_SERVER_RELATIVEPATH']; 
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
if(isset($_REQUEST['param_project_to_fck']) && $_REQUEST['param_project_to_fck']!=""){ //base64 encoded relative folder path of the project corresponding to the webroot; should be like "/project/folder/path/" before encoding 
$relative_path=base64_decode($_REQUEST['param_project_to_fck']);
include_once($_SERVER['DOCUMENT_ROOT'].$relative_path."configurations/configuration.php");
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;
并替换以下代码:

if(isset($SERVER_RELATIVEPATH) &&  $SERVER_RELATIVEPATH==$relative_path) { //to make it relatively secure so that hackers can not create any upload folder automatcally in the server, using a direct link and can not upload files there 
$Config['Enabled'] = true ;
$file_upload_relative_path=$SERVER_RELATIVEPATH;
}else{
$Config['Enabled'] = false ;
exit();
}
// Path to user files relative to the document root.
//$Config['UserFilesPath'] = '/userfiles/' ;
//$Config['UserFilesPath'] = $file_upload_relative_path.'userfiles/' ;
$Config['UserFilesPath'] = '/userfiles'.$file_upload_relative_path;
此处$SERVER_RELATIVEPATH是相对路径,必须在前面包含的项目配置文件中进行设置

在这里,您可以使用$file\u upload\u relative\u path变量将$Config['UserFilesPath']与任何其他动态文件夹路径一起设置,由于项目根文件夹0755权限与其下的userfiles文件夹之间存在文件夹用户权限冲突,根据FCKeditor编码,userfiles下的子文件夹应为0777,因此不允许上载这些文件夹中的文件。因此,我在服务器webroot上创建了一个文件夹userfiles,位于项目根文件夹之外,并将权限设置为0777,使用$config设置的代码如下:

$Config['UserFilesPath'] = '/userfiles'.$file_upload_relative_path; 
但是,如果您对案例中项目子文件夹的写入权限没有问题,则可以使用在上一代码段中注释掉的上一行:

$Config['UserFilesPath'] = $file_upload_relative_path.'userfiles/' ;
注意,您必须注释掉现有的$Config['UserFilesPath']='/userfiles/';在这个文件中,如果它存在于文件的其他位置,则替换它或简单地注释掉它

2如果您选择1 a ii或iii方法,则打开 fckeditor\editor\filemanager\browser\default\browser.html文件

搜索此行:var sConnUrl=GetUrlParam'Connector'

将以下命令放在该行之后:

var param_project_to_fck = GetUrlParam( 'param_project_to_fck' ) ; 
现在,搜索此行:sUrl+='&CurrentFolder='+encodeURIComponent this.CurrentFolder

将此命令放在该行之后:

sUrl += '&param_project_to_fck=' + param_project_to_fck ; 
sUrl += '&param_project_to_fck='+window.parent.param_project_to_fck;
b现在,打开ckeditor\editor\filemanager\browser\default\frmupload.html文件

搜索此行它应位于SetCurrentFolder函数中:

sUrl += '&CurrentFolder=' + encodeURIComponent( folderPath ) ;
将此命令放在该行之后:

sUrl += '&param_project_to_fck=' + param_project_to_fck ; 
sUrl += '&param_project_to_fck='+window.parent.param_project_to_fck;
3现在,如果要在项目中显示FCKeditor,必须先将这些行放在相应的php文件/页面中:

include_once(Absolute/Folder/path/for/FCKeditor/."fckeditor/fckeditor.php") ; 
$oFCKeditor = new FCKeditor(Field_name_for_editor_content_area) ;
$oFCKeditor->BasePath = http_full_path_for_FCKeditor_location.'fckeditor/' ;
$oFCKeditor->Height = 400;
$oFCKeditor->Width = 600;
$oFCKeditor->Value =Your_desired_content_to_show_in_editor;
$oFCKeditor->Create() ; 
现在,如果您选择1 a ii或iii方法,则将以下代码段放在该行之前:$oFCKeditor->Create

$oFCKeditor->Config["LinkBrowserURL"] = ($oFCKeditor->BasePath)."editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php&param_project_to_fck=".base64_encode($SERVER_RELATIVEPATH);
$oFCKeditor->Config["ImageBrowserURL"] = ($oFCKeditor->BasePath)."editor/filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/php/connector.php&param_project_to_fck=".base64_encode($SERVER_RELATIVEPATH);
$oFCKeditor->Config["FlashBrowserURL"] = ($oFCKeditor->BasePath)."editor/filemanager/browser/default/browser.html?Type=Flash&Connector=../../connectors/php/connector.php&param_project_to_fck=".base64_encode($SERVER_RELATIVEPATH);
b如果您选择1 a ii方法,那么在上述代码段中,只需将所有文本:base64\u encode$SERVER\u RELATIVEPATH替换为以下文本:base64\u encodesession\u name


您就完成了。

用户文件路径:在这里包括用户文件目录的完整URL。例如,将其设置为。

UserFilesPath:此处包含用户文件目录的完整URL。例如,将其设置为。

谢谢亚历山大!我有一个问题,只是使用图像,而不是许可。我是否需要提供使用上传图像的路径。例如,图像路径显示为localhost/userfiles/image/image.jpg,因为它必须是localhost/folder/userfiles/image/image.jpg再次感谢您!我有一个问题,只是使用图像,而不是许可。我是否需要提供使用上传图像的路径。例如,图像路径显示为localhost/userfiles/image/image.jpg,因为它必须是localhost/folder/userfiles/image/image.jpg。再次感谢