Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Search the Community

Showing results for tags 'excepetion'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Haze
    • Announcements & Updates
    • Official Files
    • User Central
  • Web development
    • CMS & Scripts
    • Codes
    • Tutoriais
    • Work in Progress
    • Support
    • Others
  • Games Development
    • Browser Games
    • Minecraft
    • Unreal Engine
    • Unity 3D
    • Cry Engine
    • JavaScript (HTML5)
    • Publish your Project
    • Support
    • Outros
  • Desktop Development
    • Codes
    • Tutoriais
    • Work in Progress
    • Outros
  • Graphic Design
    • Tutorials
    • Resources
    • Gallery
    • Support
  • O mundo fora...
    • Sales & Purchases
    • Mídia
    • Debates
    • Taverna

Product Groups

  • Account Modifications
  • Licenses

Categories

  • Officials
  • CMS & Layouts
    • Wordpress
    • HTML/CSS
    • PHP Script
    • Outros
  • Jogos
    • Habbo Hotel
    • Minecraft
    • Engines
  • Desktop
    • C#
    • Node
  • Design
    • Editáveis
    • Recursos de Imagens
    • Others

Categories

  • games
  • TV Shows
  • Technology
  • Cinema

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


E-mail


Facebook


Twitter


Skype


Discord


WhatsApp


Behance


DeviantArt


GitHub


Codepen


Outro

Found 1 result

  1. E X P L 0 I T E R

    Fala aí. Vou deixar um código simples para estudo. Ele irá criar um diretório chamado "uploads" na pasta raíz do código na hora que o upload for feito, e lá dentro estará o arquivo. Caso não consiga realizar o upload dará saídas de Excepetion. Conteúdo Oculto <form method="POST" enctype="multipart/form-data"> <input type="file" name="fileupload"> <button type="submit">Send</button> </form> <?php if ($_SERVER["REQUEST_METHOD"]=="POST"){ $file = $_FILES["fileupload"]; if ($file["error"]){ throw new Excepetion("Error: ". $file["error"]); } $diruploads = "uploads"; if(!is_dir($diruploads)){ mkdir($diruploads); } if(move_uploaded_file($file["tmp_name"], $diruploads . DIRECTORY_SEPARATOR . $file["name"])){ echo "Upload realizado com sucesso!"; }else{ throw new Excepetion("Não foi possível fazer o upload do ". $file); } } ?> Espero que possam brincar com ele, é bem simples.
×