Why is the PHP file content printed instead of runned?
347140
It seems you have not configured your Web server (apache) for PHP. Try like.. I've got this from PHP manual...\n\nPHP and Apache 2.0 on Windows\nConsider to read the Windows specific notes for Apache 2.0. \n\n\nWarning \nApache 2.0 is designed to run on Windows NT 4.0, Windows 2000 or Windows XP. At this time, support for Windows 9x is incomplete. Apache 2.0 is not expected to work on those platforms at this time. \n \n\nDownload the most recent version of Apache 2.0 and a fitting PHP version from the above mentioned places. Follow the Manual Installation Steps and come back to go on with the integration of PHP and Apache. \n\nThere are two ways to set up PHP to work with Apache 2.0 on Windows. One is to use the CGI binary the other is to use the Apache module DLL. In either case you need to stop the Apache server, and edit your httpd.conf to configure Apache to work with PHP. \n\nYou need to insert these three lines to your Apache httpd.conf configuration file to set up the CGI binary: Example 3-7. PHP and Apache 2.0 as CGI\n\nScriptAlias /php/ "c:/php/"\nAddType application/x-httpd-php .php\nAction application/x-httpd-php "/php/php.exe"\n \n \n\n\nIf you would like to use PHP as a module in Apache 2.0, be sure to move php4ts.dll for PHP 4, or php5ts.dll for PHP 5, to winnt/system32 (for Windows NT/2000) or windows/system32 (for Windows XP), overwriting any older file. You need to insert these two lines to your Apache httpd.conf configuration file to set up the PHP-Module for Apache 2.0: Example 3-8. PHP and Apache 2.0 as Module\n\n; For PHP 4 do something like this:\nLoadModule php4_module "c:/php/sapi/php4apache2.dll"\nAddType application/x-httpd-php .php\n\n; For PHP 5 do something like this:\nLoadModule php5_module "c:/php/sapi/php5apache2.dll"\nAddType application/x-httpd-php .php\n \n \n\n\nNote: Remember to substitute the c:/php/ for your actual path to PHP in the above examples. Take care to use either php4apache2.dll or php5apache2.dll in your LoadModule directive and notphp4apache.dll or php5apache.dll as the latter ones are designed to run with Apache 1.3.x.
936218
php sites often expose the php as phps (source)... big mistake!\n\nsometimes the ftp is open, and you can swoop in and steal the whole server.\n\nbut the best way is to swipe it from a shared server!\n\nOf course you can only clone a website designed by kids!
664249
After seeing this question asked many times (I still don't know why it keeps being asked), I decided to try it. My understanding is that you cant just open the source file and print it which would be the obvious way. Well, its much harder than it seems, but after several hours I did get some code to work. There is purposely "sloppy" or "poor" coding in it to get to work, but its the best I could do in a few hours time. \n\nI dont know if I want to share it though, because it was tuff.
676820
you don't need to convert anything. just put the html code outside the <?php ... and ?> tags and they will show up as normal html.
1008464
Yep It's PHP related. You will need to use the database that you use. use your current scripting language to access the data then print the result to the email(html) to be generated. I think you need to go to someone who manage and/or administrate the database to help you with this.
871414
you need to take the php script, (assuming it is very generic with no DB interaction)\nand FTP the file to a server running APACHE with PHP installed.\nYou need to learn about FTP, this is the method for transfering files back and forth between you and a server.\nOnce your php file is on the server, you can enter the path to the php file from your browser.\nie: http://www.mywebsite.com/myphpfile.php\nIf you have no errors, your page should display whatever is in your file.\n\n<?echo phpinfo();?>\nis a simplistic php file to test out with.
590808
onClick ( window.open("file.php") )
947812
initializesession.php\n  session_start()\n  $_SESSION['testvar'] = "test";\n\n\nrestievesession.php\n  session_start()\n  echo $_SESSION['testvar']\n\n\nJUST TRY TO RUN 1ST FILE "initializesession.php" AND THEN "restievesession.php" YOU WILL GET THE OUTPUT,BUT IF U RUN THE 2ND FILE "restievesession.php" FIRST THEN U NEVER GET THE OUT,SO FIRST U INITIALIZE THE VARIABLE IN THE SESSION AND THEN U CAN RETRIEVE THAT VARIABLE ANY WHERE IN THE PROJECT BUT THE CONDITION WILL BE U MUST DEFINE  session_start() FUNCTION
260578
The code is broken for the page to load correctly. A method which is how the get statement is executed.\n\nTry using anohter browser or call the webmaster for the site
102928
I'm not a php programmer... but using other programing languages is quite simple. Use an algorithm like this: define a matrix or a vector (depends on how many numbers you want listed) and start the random procedure: first chooses a number and compares it with every variable of the matrix/vector, if it's different then write it on the page and in the current position in the matrix. This is just a pseudo-code, but it's easy.
467689
make php file and put this codes in it\n\n<?\n$name= $_REQUEST['name'];\n$last= $_REQUEST['last'];\n$email= $_REQUEST['email'];\n$msg= $_REQUEST['msg'];\n$msg2="\n<div align=&#92;"center&#92;">\n<table border=&#92;"1&#92;" width=&#92;"42%&#92;" bordercolor=&#92;"#C0C0C0&#92;" height=&#92;"208&#92;">\n<tr>\n<td>".$name."</td>\n</tr>\n<tr>\n<td>".$last."</td>\n</tr>\n<tr>\n<td>".$email."</td>\n</tr>\n<tr>\n<td height=&#92;"105&#92;">".$msg."</td>\n</tr>\n</table>\n</div>";\n\n\n$to  = "your@email.com" . ", " ; // note the comma\n$to .= "your@email.com";\n\n$subject = "Online Form";\n$headers  = "MIME-Version: 1.0&#92;r&#92;n";\n$headers .= "Content-type: text/html; charset=iso-8859-1&#92;r&#92;n";\n$headers .= "From: Sales Department <visitor@yoursite.com>&#92;r&#92;n";\n$headers .= "Cc: your@email.com&#92;r&#92;n";\n\nmail($to, $subject, $msg2, $headers);\ninclude("done.html");\n\n?>\n\n\nand make this html form\n\n<form method="POST" name="mail" action="mail.php">\n<table width="400" cellspacing="2" cellpadding="2" border="0">\n  <tr>\n    <td width=90>name:</td>\n    <td>\n<input name="name" type="text" style="border-width:1; font-family: tahoma; font-size: 1em; width: 160" onkeypress="return submitenter(this,event)" onkeydown="return changelang(this);" size="1"></td>\n  </tr>\n<tr>\n    <td width=90>lastname:</td>\n    <td>\n<input name="last" type="text" style="border-width:1; font-family: tahoma; font-size: 1em; width: 160; height:17" onkeypress="return submitenter(this,event)" onkeydown="return changelang(this);" size="1"></td>\n  </tr>\n<tr>\n    <td>email:</td>\n    <td><input name="email" dir="ltr" type="text" style="border-width:1; font-family: tahoma; font-size: 1em; width: 160"></td>\n  </tr>\n<tr>\n    <td valign=top>decription:</td>\n    <td>\n<textarea name="msg" cols="28" rows="3" id="comments" style="border-width:1; font-family: Tahoma; font-size: 1em; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1; width:220px;" onkeypress="return submitenter(this,event)" onkeydown="return changelang(this);"></textarea></td>\n  </tr>\n<tr>\n    <td></td>\n    <td><input type="submit" value="submit" name="submit" style="font-family: Tahoma; font-size: 1em"></td>\n  </tr>\n</table>\n</form>\n\nalso make done.html and put your tanx message in it
207382
The PHP docs are quite good and include examples:\n\nhttp://www.php.net/manual/en
511879
Perhaps it's a security thing...? I don't know asp, but in php it can mess up that kind of thing with security, or if you're literally interpreting the input, or if your code is just plain bad...
150694
That link doesn't show the code. It shows the page that is created by the code.\nFor really professional php help, I suggest trying out irc.\nthen join the server irc.freenode.net\nand the channel #php
858387
What platform: PHP or ASP.NET?\nDo you have support for database? If so, which kind: Access, MS-SQL, MySQL?\n\nUPDATE:\n\nThe script is complete and ready for use.\n\nhttp://www.dougv.com/blog/2006/11/26/a-simple-php-script-mysql-too-to-track-radio-station-song-requests/
108097
If you use a server side scripting language, such as php, the code is running on the server and the result is passed to the www server in html format.\nIn case of client side scripting, such as javascript, the entire script code is downloading to the local machine and the browser interprets it.
220900
It's not in ASP, because it's running off FreeBSD with an unknown server:\n\nhttp://uptime.netcraft.com/up/graph?site=answers.yahoo.com\n\nMy guess would be this is run via a combination of compiled code, probably written in C++ or similar, with some AJAX components.