Prev: How verify whether browser arrived via IPv6, IPv4, domain or number
Next: Regular expressions, filter option1 OR option2
From: e-letter on 18 Aug 2010 04:44 Readers, Copy below of message sent 15 August to php install digest list, but to date not including in mail archive? The tutorial example: <html> <head> <title>php test </title </head> <body> <?php echo '<p>Hi, I am a PHP script</p>'; ?> <p> this is a test </p> </body> </html> is saved to the normal user temporary folder as 'test.php' and then copied to the folder '/var/www/html/' using the root user account. The web browser is directed to url 'http://localhost.test.php, to show: Hi, I am a PHP script '; ?> this is a test What is the error please? Urpmi was used to install so the php version installed is not known. How to obtain this please
From: "Arno Kuhl" on 18 Aug 2010 04:57 -----Original Message----- From: e-letter [mailto:inpost(a)gmail.com] Sent: 18 August 2010 10:44 AM To: php-general(a)lists.php.net Subject: [PHP] tutorial failure Readers, Copy below of message sent 15 August to php install digest list, but to date not including in mail archive? The tutorial example: <html> <head> <title>php test </title </head> <body> <?php echo '<p>Hi, I am a PHP script</p>'; ?> <p> this is a test </p> </body> </html> is saved to the normal user temporary folder as 'test.php' and then copied to the folder '/var/www/html/' using the root user account. The web browser is directed to url 'http://localhost.test.php, to show: Hi, I am a PHP script '; ?> this is a test What is the error please? Urpmi was used to install so the php version installed is not known. How to obtain this please -- Shouldn't that be http://localhost/test.php Cheers Arno
From: Peter Lind on 18 Aug 2010 05:16 On 18 August 2010 10:44, e-letter <inpost(a)gmail.com> wrote: > Readers, > > Copy below of message sent 15 August to php install digest list, but > to date not including in mail archive? > > The tutorial example: > > <html> > Â Â Â <head> > Â Â Â Â Â Â Â <title>php test > Â Â Â Â Â Â Â </title > Â Â Â </head> > Â Â Â <body> > Â Â Â Â Â Â Â <?php > Â Â Â Â Â Â Â Â Â Â Â echo '<p>Hi, I am a PHP script</p>'; > Â Â Â Â Â Â Â ?> > Â Â Â Â Â Â Â <p> > Â Â Â Â Â Â Â this is a test > Â Â Â Â Â Â Â </p> > Â Â Â </body> > </html> > > is saved to the normal user temporary folder as 'test.php' and then > copied to the folder '/var/www/html/' using the root user account. The > web browser is directed to url 'http://localhost.test.php, to show: > > Hi, I am a PHP script > > '; ?> > > this is a test > > What is the error please? Looks like a problem with quotes, I'd say. > Urpmi was used to install so the php version installed is not known. > How to obtain this please Check with php -i from the command line or a script containing phpinfo(); requested through the browser. Regards Peter -- <hype> WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 </hype>
From: e-letter on 18 Aug 2010 06:03 I changed the code as follows: <html> <head> <title>php test </title> </head> <body> <?php phpinfo ?> <?php echo "<p>Hi, I am a PHP script</p>"; ?> <p> this is a test </p> </body> </html> The result (http://localhost/test.php): Hi, I am a PHP script "; ?> this is a test If I use single quotes characters: Hi, I am a PHP script '; ?> this is a test The phpinfo instruction does not seem to be recognised. What else should I check?
From: chris h on 18 Aug 2010 06:12 php is not processing the file. There's a few reasons for this, but the first thing I would check is the permissions of the file. From the directory try $ ls -oa This should tell you who owns the file and what it's permissions are. You mentioned that you copied it as root, you could change it's ownership to www-data. again from the directory try. $ chown www-data test.php then run ls -oa to ensure the change took place. Chris. On Wed, Aug 18, 2010 at 6:03 AM, e-letter <inpost(a)gmail.com> wrote: > I changed the code as follows: > > <html> > <head> > <title>php test > </title> > </head> > <body> > <?php phpinfo ?> > <?php > echo "<p>Hi, I am a PHP script</p>"; > ?> > <p> > this is a test > </p> > </body> > </html> > > The result (http://localhost/test.php): > > Hi, I am a PHP script > > "; ?> > > this is a test > > If I use single quotes characters: > > Hi, I am a PHP script > > '; ?> > > this is a test > > The phpinfo instruction does not seem to be recognised. What else > should I check? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
|
Next
|
Last
Pages: 1 2 3 4 5 6 7 Prev: How verify whether browser arrived via IPv6, IPv4, domain or number Next: Regular expressions, filter option1 OR option2 |