Função para limpar ARK
This commit is contained in:
parent
dba0436b4b
commit
320be2b946
16
index.php
16
index.php
@ -29,6 +29,19 @@ function reduzirArk($tamanho, $pedacos) {
|
||||
|
||||
}
|
||||
|
||||
function limpar_ark($str){
|
||||
|
||||
// Lista de caracteres a serem removidos
|
||||
$caracteresParaRemover = array('<', '>', ':', ';', '(', ')', '&', '$');
|
||||
|
||||
// Substitui os caracteres da lista por uma string vazia
|
||||
$stringLimpa = str_replace($caracteresParaRemover, '', $str);
|
||||
|
||||
return $stringLimpa;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function direcionar_ark() {
|
||||
|
||||
$pasta_json = "json"; //Substitua pelo nome que vc escolheu para colocar os metadados ARK em JSON
|
||||
@ -51,6 +64,9 @@ function direcionar_ark() {
|
||||
}
|
||||
|
||||
|
||||
//limpar o ARK
|
||||
$ark = limpar_ark($ark);
|
||||
|
||||
|
||||
//Eliminando espaços em branco no início e no final do $ark
|
||||
$ark = trim($ark);
|
||||
|
Loading…
x
Reference in New Issue
Block a user