0

Greetings guys,

I am barely new to php and i have incoming presentation from a company and they asked me to build some basic website using sublime text 2. here's my problem i don't have any clue on how to display result from php to a web browser. In notepad++ you only need to save it as. e.g: HelloWorld.php; How about in sublime text 2? Is it also the same? or no?

Any answer would be much appreciated.

Thanks in advance :D.

2
Contributors
2
Replies
11
Views
3 Years
Discussion Span
Last Post by Jake2025
1

I guess sublime text is just an editor with good features for progammers. But any simple notepad is enough to write php code.

create text file name it as HelloWorld.php (or any name with extension as php)
open it and write following code

    <?php
    echo "this is php code";
    echo "Hello world";

    ?>
<h1> This is html code </h1>

<h2 > this is <?php echo "php embeded in html"; ?> </h2>

Save that file in your web root directory and open it with appropriate location in any browser.

url : http://localhost/anyfolder/anysubfolder/HelloWorld.php

Edited by urtrivedi

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.