✏️ Edit: upload.php
Path:
/home/thiqat5/admincrud.thiqatech.com/sql/modules/upload.php
Size: 870 B · Modified: 2023-08-20 10:31:19 · Perm: 0644 · Writable
← Back to directory
👁 View
⬇ Download
<?php /** * This file is a part of MyWebSQL package * * @file: modules/upload.php * @author Samnan ur Rehman * @copyright (c) 2008-2014 Samnan ur Rehman * @web http://mywebsql.net * @license http://mywebsql.net/license */ function processRequest(&$db) { /*$targetFolder = '/tmp'; // Relative to the root if (!empty($_FILES)) { $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder; $targetFile = rtrim($targetPath,'/') . $_FILES['Filedata']['name']; // Validate the file type $fileTypes = array('jpg','jpeg','gif','png'); // File extensions $fileParts = pathinfo($_FILES['Filedata']['name']); if (in_array($fileParts['extension'],$fileTypes)) { move_uploaded_file($tempFile, $targetFile); echo '1'; } else { echo 'Invalid file type'; } }*/ } ?>
💾 Save
Cancel
Save as UTF-8, newlines normalized to LF