$objPHPExcel = PHPExcel_IOFactory::load("simple.xlsx");
$maxCell = $objPHPExcel->getActiveSheet()->getHighestRowAndColumn();
$data = $objPHPExcel->getActiveSheet()->rangeToArray('A1:' . $maxCell['column'] . $maxCell['row']);
$data = array_map('array_filter', $data);
$data = array_filter($data);
# Mod_Autoindex
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
# Mod_Rewrite
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
IndexIgnore */*
RewriteRule ^admin/(.*)?$ /backend/web/$1 [L,PT]
RewriteRule ^([^/].*)?$ /frontend/web/$1
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Я даже не понимаю как так получается, что файл index.php абсолютно пустой, но при этом всё ОК
if (isset($_POST['edit'])) {
$uploaddir = 'files/';
$apend = date('YmdHis').rand(100,1000).'.jpg';
$uploadfile = "$uploaddir$apend";
$query_fields = [];
if (($_FILES['file']['type'] == 'image/gif' || $_FILES['file']['type'] == 'image/jpeg' || $_FILES['file']['type'] == 'image/png')
&& ($_FILES['file']['size'] != 0 and $_FILES['file']['size']<=512000))
{
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
{
$size = getimagesize($uploadfile);
$query_fields[] = "`photo`= '$uploadfile'";
}
}
$query_fields[] = "`Price` = '".$_POST['Price']."'";
$query_fields[] = "`Model` = '".$_POST['Model']."'";
$query = "UPDATE `table1` SET " . join(',', $query_fields) . " WHERE `ID` = ".(int)$edit_id;
$result=mysql_query($query) or die("Error:".mysql_error());
}
u_id = get_userid()
rows = Stat.query.filter_by(user_id = u_id).update({'user_id': 1})
db.session.commit()