- Code: Select all
<?php
echo "hello, $name";
?>
Everything is ok, when I put just a path to file. But when I put in browser:
- Code: Select all
localhost/index.php?name=everyone
<?php
echo "hello, $name";
?>
localhost/index.php?name=everyone
But when I put in browser: localhost/index.php?name=everyone nothing happens.
- Code: Select all
<?php echo "hello, $name"; ?>
So, I mean when I write "localhost/index.php?name=everyone" browser must show "hello, everyone",
<?php echo "hello, {$_GET['name']}"; ?>
But when I upload file to the hosting (or server)
Wiedmann wrote:But when I upload file to the hosting (or server)
Maybe... This hosting provider have enabled a PHP option, which is default disabled in PHP since 7 years (because of security resons)... This option will be also completely removed in the next major PHP version.
(BTW: You can read this yourself in the PHP manual, chapter "external variables". You remember my last post?)
Users browsing this forum: No registered users and 152 guests