0
Good morning guys, I’m having a problem calling a link in javascript, in php I have a rule where every time I put #URL#link.... it replaces with the server address. Example #URL#public it replaces for http://localhost/public, in javascript I could not make it work. If anyone can give me a hand, I’ll put my rule in php, and below the javascript where I need to adjust.
php.config
date_default_timezone_set('America/Sao_Paulo');
error_reporting(E_ALL);
ini_set('display_errors',true);
define('URL','http://'.$_SERVER['HTTP_HOST'].'/sistema/');
define('DS', DIRECTORY_SEPARATOR);
define('PATH', getcwd().DS );
define('TEMPLATE', PATH.'view'.DS.'template.html');
Javascript that needs to be adjusted
CKEDITOR.editorConfig = function(config) {
config.filebrowserBrowseUrl = '#URL#sistema/public/plugin/ckeditor/kcfinder/browse.php';
config.filebrowserImageBrowseUrl = '#URL#sistema/public/plugin/ckeditor/kcfinder/browse.php?type=images';
config.filebrowserFlashBrowseUrl = '#URL#sistema/public/plugin/ckeditor/kcfinder/browse.php?type=flash';
config.filebrowserUploadUrl = '#URL#sistema/public/plugin/ckeditor/kcfinder/upload.php?type=files';
config.filebrowserImageUploadUrl = '#URL#sistema/public/plugin/ckeditor/kcfinder/upload.php?type=images';
config.filebrowserFlashUploadUrl = '#URL#sistema/public/plugin/ckeditor/kcfinder/upload.php?type=flash';
};
This method I could not adapt. So I tried and I managed to fix it. Thank you.
– Eduehi