Skip to content

Instantly share code, notes, and snippets.

View Rootdiv's full-sized avatar
💻
Web-development

Vladimir Rootdiv

💻
Web-development
View GitHub Profile
@Rootdiv
Rootdiv / php-file-upload.php
Created December 13, 2025 18:40 — forked from ivanitch/php-file-upload.php
Uploading a file to the server using php
// HTML form
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="image" required>
<button type="submit">Загрузить</button>
</form>
<?php
// File upload.php
// Если в $_FILES существует "image" и она не NULL
if (isset($_FILES['image'])) {
@Rootdiv
Rootdiv / php-files-multiple-upload.php
Created December 13, 2025 18:40 — forked from ivanitch/php-files-multiple-upload.php
Upload multiple files to server using php
// HTML form
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="images[]" multiple>
<button type="submit">Загрузить</button>
</form>
<?php
// File upload.php
// Если в $_FILES существует "images" и она не NULL
if (isset($_FILES['images'])) {
@Rootdiv
Rootdiv / index.html
Created March 15, 2024 19:23
Vue Todo List
<div id="app">
<div class="container">
<h1 class="title">{{ title }}</h1>
<div class="card">
<div class="card__inner">
<form>
<input type="text" placeholder="Create a new todo" v-model="newItem" />
<button @click="addItem" :disabled="newItem.length === 0">Add Todo</button>
</form>
<p v-if="items.length === 0">No todos!</p>
@Rootdiv
Rootdiv / functions.php
Last active December 3, 2021 09:00 — forked from aislam23/functions.php
for Article! Navbar B-4
class bootstrap_4_walker_nav_menu extends Walker_Nav_menu {
function start_lvl( &$output, $depth = 0, $args = array() ){ // ul
$indent = str_repeat("\t",$depth); // indents the outputted HTML
$submenu = ($depth > 0) ? ' sub-menu' : '';
$output .= "\n$indent<ul class=\"dropdown-menu$submenu depth_$depth\">\n";
}
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ){ // li a span