Mam taki skrypt:
$GLOBALS['zmienna'] = $_GET['zmienna']; class UploadHandler { protected $options; 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini', 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form' 'image_resize' => 'Failed to resize image' ); public function __construct($options = null, $initialize = true, $error_messages = null) { protected function get_file_name($file_path, $name, $size, $type, $error, $index, $content_range) { //$name = $this->trim_file_name($file_path, $name, $size, $type, $error, // $index, $content_range); $name = $this->trim_file_name($file_path, md5($name.$time_start_variables), $size, $type, $error, $index, $content_range); //echo "<br/>-".$name."<br/>"; nazwa pliku zmienionego $zmienna_zapis = null; $zmienna_zapis = $name; require_once("../../db.php"); require_once("../../lib.php"); // GLOBALS['zmienna'] $ms->query("INSERT INTO " . $GLOBAL['bfprzed'] . "produkty (enable, foto1, kategoria, rozmiar) VALUES ( '1' , '" . $zmienna_zapis .".$sizeese". "', '" . GLOBALS['zmienna'] . "', '".$size."');"); return $this->get_unique_filename( $file_path, $this->fix_file_extension($file_path, $name, $size, $type, $error, $index, $content_range), $size, $type, $error, $index, $content_range ); } }
Parametrem GET dostarczam wartość do skryptu: $GLOBALS['zmienna'] = $_GET['zmienna'];
i chciałbym ją odczytać w:
$ms->query("INSERT INTO produkty (enable, foto1, kategoria, rozmiar) VALUES ( '1' , '" . $zmienna_zapis .".$sizeese". "', '" . GLOBALS['zmienna'] . "', '".$size."');");
(funkcja get_file_name)
Wie ktoś co zrobić żeby skrypt zobaczył tą wartość?