2
How can I change the code below to work in PHP versions 5.3 and 5.4? It currently only works in version 5.3.
I’m having the following mistake:
Strict Standards: Only variables should be passed by Ference in /home/public_html/admin/additor.php on line 1
$arquivo_renomeado = strtolower(end(explode('.', $nome_do_arquivo_original_alterado)));
if ($arquivo_renomeado == 'jpg' || $arquivo_renomeado == 'jpeg') {
$nome_final = str_replace($nome_do_arquivo_original_alterado,' ',$nome_da_imagem_alterada.'.jpg');
} else if ($arquivo_renomeado == 'png') {
$nome_final = str_replace($nome_do_arquivo_original_alterado,' ',$nome_da_imagem_alterada.'.png');
# Only if your version of GD includes GIF support
} else if ($arquivo_renomeado == 'gif') {
$nome_final = str_replace($nome_do_arquivo_original_alterado,' ',$nome_da_imagem_alterada.'.gif');
}
Are you sure that this is the same location where the error is displayed? Looking quickly didn’t notice anything.
– Renato Tavares
Check that in the line above the error nothing is missing.
– Lucas Burg
Yes error in renamed $filename = strtolower(end(explodes('. ', $filename original_changed)));
– Striffer
Edit the question and add the error message. The code does not seem to use any deprecated or discontinued function.
– rray
Ready is appearing the error that is in the edition in bold above. It is that Host restriction that I am hosting the site ?
– Striffer