A
A
Andrew2015-01-25 20:29:28
PHP
Andrew, 2015-01-25 20:29:28

How to send cookies to PC via php?

I want to send a cookie, but it says "that has already been sent".
888fef90b71742ada60a59418b78672f.png
Own code

<?php
session_start();
$_SESSION["StartTime"] = date("r");
echo $_SESSION["StartTime"];
?>

ps do not cut the newbie :-)

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Sergey, 2015-01-25
@butteff

set_cookie()

S
SagePtr, 2015-01-26
@SagePtr

phpfaq.com/headers

O
OlegSivokobov, 2015-01-25
@OlegSivokobov

maybe sending a cookie would help

G
Gluck Virtualen, 2015-01-25
@gluck59

Gossydya, but why the session?
setcookie() as already mentioned.

B
bubuxDD, 2017-08-09
@bubuxDD

The answer is found, we hang the listener on a mouse click, and then everything is simple

label = LabelBuilder.create()    // создание билдера для Label
                .text("SomeText")             // текстовое значение
                .prefWidth(100)                // возможная ширина
                .prefHeight(50)                // возможная высота
                .alignment(Pos.CENTER)         // выравнивание содержимого по центру
                .layoutX(100) // задание  коорд. Х
                .layoutY(100)  // задание  коорд. Y
                .style("-fx-background-color: orange;")  // зарисуем фон в оранжевый
                .build(); // создадим из билдера сам объект класса Label
        pane.getChildren().add(label);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question