|
|
|
|
|
для: vale1487
(13.06.2010 в 17:55)
| | как же блин тяжко-то всё, а...
<?
for($i=0;$i<count($_FILES['Filedata']['name']); $i++)
{
$sql = "INSERT INTO images_articles (id_articles,url) VALUES ('".$id_articles."','".$targetPath.$_FILES['Filedata']['name']."')";
echo "<pre>$sql</pre><br>";
// добавляем базу
$result1[$i]=mysql_query($sql);
}
?>
|
| |
|
|
|
|
|
|
|
для: vale1487
(13.06.2010 в 17:50)
| | Недосмотр чего?
$tempFile = $_FILES['Filedata']['tmp_name']; - значит загружен один файл
А далее:
for($i=0;$i<count($_FILES['Filedata']['name']); $i++) - попытка загрузки нескольких файлов, но не правильно. | |
|
|
|
|
|
|
|
для: Trianon
(13.06.2010 в 17:35)
| |
<?php
session_start();
$id_articles = $_SESSION['id_art'];
var_dump($id_articles);
ВИЖУ 2
// require_once("config.php") ;
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
for($i=0;$i<count($_FILES['Filedata']['name']); $i++)
{
var_dump($id_articles);
ПУСТОТА
// добавляем базу
$result1[$i]=mysql_query("INSERT INTO images_articles (id_articles,url) VALUES ('".$id_articles."','".$targetPath.$_FILES['Filedata']['name']."')");
}
?>
|
| |
|
|
|
|
|
|
|
для: sim5
(13.06.2010 в 17:37)
| | да , недосмотр | |
|
|
|
|
|
|
|
для: vale1487
(13.06.2010 в 16:46)
| | Классно:
$tempFile = $_FILES['Filedata']['tmp_name'];
for($i=0;$i<count($_FILES['Filedata']['name']); $i++)
Это как понимать? | |
|
|
|
|
|
|
|
для: vale1487
(13.06.2010 в 17:33)
| | Вы пользуетесь var_dump | |
|
|
|
|
|
|
|
для: Trianon
(13.06.2010 в 17:30)
| | не понял, а что за комманда | |
|
|
|
|
|
|
|
для: vale1487
(13.06.2010 в 16:46)
| | команды echo я так и не увидел. :( | |
|
|
|
|
|
|
|
для: Trianon
(13.06.2010 в 16:36)
| |
<?php
session_start();
$id_articles = $_SESSION['id_art'];
// require_once("config.php") ;
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
for($i=0;$i<count($_FILES['Filedata']['name']); $i++)
{
// добавляем базу
$result1[$i]=mysql_query("INSERT INTO images_articles (id_articles,url) VALUES ('".$id_articles."','".$targetPath.$_FILES['Filedata']['name']."')");
}
?>
|
| |
|
|
|
|
|
|
|
для: Gubichev
(13.06.2010 в 16:36)
| | Да пусть же поймет сперва!!
Потом уж исправлять ринется. | |
|
|
|
|