Jump to content

Very NOVICE question here guys!

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Donovan

Donovan

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 798 posts
Alright, so I decided to pick up PHP earlier this week, and as I have programming experience, learning it has been somewhat of a breeze. HOWEVER, my little experience in the nature of this language, keeps me from viewing my work!

I am used to writing HTML and having my browser automatically execute the code and allow me to view it, or using a compiler for a low-level programming language.. But, whenever I am trying to view my PHP code through .html or .php file extentions through the browser, I am presented with a blank white page.

I have tried viewing my work using html tags, as well as without. I have no tried using alternative free hosting, because I installed WAMP on my computer and all three services are running.. So, I figured what's the point, if that is what WAMP is for?

<html>
<body> // I figured using the HTML tags, and calling forth the use of PHP within a .html document would fix this problem. But no!

<?php
    echo "Hello CodeCall!";
?>

</html>
</body>

Anyway, if you can get me to a point to where I can view my code and write, sort of like you would C++ if you will.. Write the code > Debug > Compile > View End Result; I would really appreciate it!

Thanks,
Donovan

#UPDATE: I have just tried to execute normal HTML code through the browser, and this works just fine. But, I only receive problems while executing PHP. The problem being, the server does not execute the code? I know something is going on, because the PHP lines are not displayed in text form on the screen either.
Posted Image
+Friend Me | My Graphics | Forum Rules | Help Forum | Forum FAQ

#2
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
First the extension of the file has to be php (it can be changed, but that a other story)
Than you have to display the page via wamp so insted by default the url for wamp is http://127.0.0.1 sometime it's http://127.0.0.1:8080
And of course, you have to configure wamp to load the correct folder.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You can also use XAMPP, if you find WAMP to be a little twitchy.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
Donovan

Donovan

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 798 posts
Ah it is working now! Thank you both for the help. +Rep is being added Vaielab, and much appreciated.
Posted Image
+Friend Me | My Graphics | Forum Rules | Help Forum | Forum FAQ




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users