Hii ,
I am a beginner in PHP .I would like to know how one can execute a PHP script using XAMPP server ... ??
Any suggestions ... :)
Assuming Windows:
Navigate to your "localhost" folder (usally): C:\xampp\htdocs
Create a new folder called "ravi", and inside that folder create a file called: index.php
Put all your PHP code in that index.php file and save the file.
Then, after starting XAMPP, navigate to: http://localhost/ravi/
And you'll see your script running.
Gav
Of course your index.php should follow the php rules. For example your code has to start with
<?php
and end with ?>
You can use this tutorial http://www.w3schools.com/php/php_syntax.asp to get some information regarding php how-to
1) Open the XAMPP Control Panel from the start menu.
2) To the right of where it says "Apache" click 'Start' button.
3) On the right side of the screen, click the 'Explore' button.
4) Open the "htdocs" folder. This will be your working directory where you put your php files.
5) As a test, make a new file called "hello.php" and put the following code in it:
<?php echo "Hello world!"; ?>
6) Now in your browser (Firefox, Chrome, Internet Explorer, etc.) go to either of the following two links to run your PHP script from step 5:
http://127.0.0.1/hello.php
http://localhost/hello.php
I am new to PhP and as mentioned by you above i tried the same process but still i am not able to see the output, in fact i am getting the following error. Could anyone look it and help me in solving my problem.
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster. Error 404 127.0.0.1 Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7