fork download
  1. <?php
  2. //exibir todos os erros.
  3. ini_set('display_errors', true);
  4.  
  5. $_UP['extensoes'] = array('docx', 'xlsx', 'pdf', 'jpg', 'png', 'gif', 'jpeg' );
  6. $_FILES['arquivoJuridico']['name'] = "nome.pdf";
  7.  
  8. //Strict Standards
  9. $extensao = strtolower(end(explode('.', $_FILES['arquivoJuridico']['name'])));
  10.  
  11. if (in_array($extensao, $_UP['extensoes']) === false) {
  12. echo "Por favor, envie arquivos com as seguintes extensões: jpg, png ou gif";
  13. }
  14. $_FILES['arquivoJuridico']['name'] = "nome.docx";
  15. $extensao = strtolower(end(explode('.', $_FILES['arquivoJuridico']['name'])));
  16. if (array_search($extensao, $_UP['extensoes']) === false) {
  17. echo "Por favor, envie arquivos com as seguintes extensões: jpg, png ou gif";
  18. }
  19. ?>
  20.  
Success #stdin #stdout #stderr 0.01s 24448KB
stdin
Standard input is empty
stdout
Strict Standards: Only variables should be passed by reference in /home/zcrVZI/prog.php on line 10

Strict Standards: Only variables should be passed by reference in /home/zcrVZI/prog.php on line 16
stderr
PHP Strict Standards:  Only variables should be passed by reference in /home/zcrVZI/prog.php on line 10
PHP Strict Standards:  Only variables should be passed by reference in /home/zcrVZI/prog.php on line 16