Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.javascript > #4875
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Newsgroups | de.comp.lang.javascript |
| Subject | Re: Warum funktioniert das nicht (Variable aus DB> JS) |
| Date | 2017-06-26 15:26 +0200 |
| Organization | solani.org |
| Message-ID | <oir229$rqt$1@solani.org> (permalink) |
| References | <oir0uu$h9h$1@news.albasani.net> <14691767.geO5KgaWL5@PointedEars.de> |
Am 26.06.2017 um 15:11 schrieb Thomas 'PointedEars' Lahn:
> Jan Novak wrote:
>
>> was machei ich hier falsch, dass mir in die Variable df nicht der Wert
>> "dd.mm.yy" geschroieben wird (so steht er in der DB).
>> Wenn ich ihn local definiere (auskommentierte Zeile), dann funktioniert
>> es.
>>
>> <script type="text/javascript">
>> var
>> df=Carbon\Carbon::now()-
>> format(\App\Setting::getSettingFor("DATE_FORMAT"));
>
> Das funktioniert nicht, weil es für die Script-Engine syntaktisch fhcsal
> ist. Es ist (möglicherweise) PHP-Code, aber sicher kein ECMAScript-
> konformer Code. Deshalb erhältst Du auch einen Syntaxfehler in der Console.
Meine *Kristallkugel* sagt mir, dass hier das "PHP-Echo-Tag" vergessen
wurde:
var df="<?=Carbon\Carbon::now()->format(
\App\Setting::getSettingFor("DATE_FORMAT")
)?>";
--
Christoph M. Becker
Back to de.comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <bforpc@yahoo.de> - 2017-06-26 15:07 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-26 15:11 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-06-26 15:26 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-26 15:32 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-06-26 15:52 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-27 07:07 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <repcom@gmail.com> - 2017-06-27 14:54 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-06-27 15:54 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <repcom@gmail.com> - 2017-06-27 19:35 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-28 19:30 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <repcom@gmail.com> - 2017-06-29 17:20 +0200
OT: Editor (war: Warum funktioniert das nicht (Variable aus DB> JS)) Jan Novak <repcom@gmail.com> - 2017-06-29 20:28 +0200
Re: OT: Editor Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-30 01:51 +0200
Re: OT: Editor Jan Novak <repcom@gmail.com> - 2017-06-30 09:14 +0200
Re: OT: Editor Jan Novak <repcom@gmail.com> - 2017-06-30 10:08 +0200
Re: OT: Editor Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-30 16:51 +0200
Programmierung mit Atom (was: OT: Editor) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-11 19:05 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Gerome Muent <kontakt@bmservices.de> - 2017-06-27 09:13 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-27 11:30 +0200
csiph-web