why there is no ouput for my php code?

  • gamekiller
  • Graduate
  • Graduate
  • gamekiller
  • Posts: 101
  • Loc: above the chair

Post 3+ Months Ago

Hye,
Yesterday, i finished my latest fedora core which is eight.. then, i update this machine include, php and other packages.

so, i type this simple code..

Quote:
<html>
<head><title>Example</title></head>
<body>
<h1><?php echo "Hello World"; ?></h1>
<?php
$txt = "This is my first PHP script";
/* This line creates the variable $txt and gives it the initial value. Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive. */

echo $txt;
?>
</body>
</html>

i put it in /var/www/html/ as index.php

but, when i go the web browser, nothing show.. why? i also already start the httpd service.. which part i missing?
  • delNorto
  • Novice
  • Novice
  • delNorto
  • Posts: 21
  • Loc: Netherlands

Post 3+ Months Ago

Please provide some more info :

- what exactly did you type in your location bar, e.g. http://localhost/index.php ???
- what did the browser show you as an result; a blank page or an error page ?
  • gamekiller
  • Graduate
  • Graduate
  • gamekiller
  • Posts: 101
  • Loc: above the chair

Post 3+ Months Ago

sorry for the lack information..

1. i type exactly localhost/index.php
2. the browser didnt show anything. It's a blank page..
  • delNorto
  • Novice
  • Novice
  • delNorto
  • Posts: 21
  • Loc: Netherlands

Post 3+ Months Ago

Are you sure that Apache is running ??
If you put just a .html file in your webroot, does that page show up in your browser ?
  • gamekiller
  • Graduate
  • Graduate
  • gamekiller
  • Posts: 101
  • Loc: above the chair

Post 3+ Months Ago

ahh.. just forget it but thanks for reply.. actually, i reboot the machine this morning and it works.. weird.. i think everything is fine now and i also can run the php file..
thanks.. :)
  • delNorto
  • Novice
  • Novice
  • delNorto
  • Posts: 21
  • Loc: Netherlands

Post 3+ Months Ago

No worries, ... glad it works now :mrgreen:
  • magstudios
  • Novice
  • Novice
  • magstudios
  • Posts: 31

Post 3+ Months Ago

Hi delNorto you r right our site is just in under construction and all the error in the mind and correct it very soon thanks for your important view.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 86 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.