| Off Topic > Off Topic |
| Php |
| << < (4/6) > >> |
| heedicalking:
I need help D: Here is the code. --- Code: ---<?php /********************************************/ /* This is a simple demonstration on how to */ /* place the poll on your pages. */ /********************************************/ ?> <html> <head> <title>Simple PHP Poll Demonstration</title> <!-- The JavaScript makes the pop-up window. --> <script type="text/javascript"> window.name = "parent"; function voteForma() { window.open("","votewindow","menubar=0,resizable=0,width=512,height=256"); document.vform.submit(); setTimeOut("document.location.reload()", 1000); } function voteFormb() { window.open("","votewindow","menubar=0,resizable=0,width=512,height=256"); document.vformb.submit(); } </script> <!-- The JavaScript makes the pop-up window. --> </head> <body> <?php $v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote"; //This is the path from here to the poll. include $v_path . "poll.php"; //Now we include it. //Yes, you NEED to define $v_path!! //Also, if you're using XHTML, make sure to include this: //$xhtml = "1"; //So your coding remains compliant ?> </body> </html> --- End code --- Error: --- Code: ---Warning: include(/home/tcwildc1/public_html/Heedy/Poll/votepoll.php) [function.include]: failed to open stream: No such file or directory in /home/tcwildc1/public_html/Heedy/index.php on line 192 Warning: include() [function.include]: Failed opening '/home/tcwildc1/public_html/Heedy/Poll/votepoll.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tcwildc1/public_html/Heedy/index.php on line 192 --- End code --- For my poll I am trying to get working D: Wat2do? |
| Kalphiter:
--- Code: ---include $v_path . "poll.php"; --- End code --- Are you kidding me? --- Code: ---include "poll.php"; --- End code --- Saying that it's in the same directory, otherwise use ./dir/ or ../uponedir/ |
| heedicalking:
--- Quote from: Kalphiter on November 27, 2009, 12:49:17 AM --- --- Code: ---include $v_path . "poll.php"; --- End code --- Are you kidding me? --- Code: ---include "poll.php"; --- End code --- Saying that it's in the same directory, otherwise use ./dir/ or ../uponedir/ --- End quote --- So I change --- Code: ---include $v_path . "poll.php"; --- End code --- to --- Code: ---include "poll.php"; --- End code --- ? |
| Ephialtes:
--- Code: ---$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote"; //This is the path from here to the poll. --- End code --- To: --- Code: ---$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote/"; //This is the path from here to the poll. --- End code --- You were missing a slash. If this script says you need to define the $v_path var, it's probably a good idea to just do it. @laremere: Why not just use Wordpress or something? A bunch of sites host those for free. You don't need to build a bespoke solution by the sounds of things. If you do need php though, just whack WAMP (http://www.wampserver.com/en/) on a computer. It'll setup a standard LAMP environment on windows and gives you some simple tools to do everything. |
| heedicalking:
--- Quote from: Ephialtes on November 27, 2009, 08:48:04 AM --- --- Code: ---$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote"; //This is the path from here to the poll. --- End code --- To: --- Code: ---$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote/"; //This is the path from here to the poll. --- End code --- You were missing a slash. If this script says you need to define the $v_path var, it's probably a good idea to just do it. @laremere: Why not just use Wordpress or something? A bunch of sites host those for free. You don't need to build a bespoke solution by the sounds of things. If you do need php though, just whack WAMP (http://www.wampserver.com/en/) on a computer. It'll setup a standard LAMP environment on windows and gives you some simple tools to do everything. --- End quote --- It embeds correctly but doesn't work when I try to vote. --- Code: ---The requested URL /home/tcwildc1/public_html/Heedy/Poll/vote/poll.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at blockplanetonline.com Port 80 --- End code --- Do I have to change permission? |
| Navigation |
| Message Index |
| Next page |
| Previous page |