Author Topic: Php  (Read 1637 times)

I need help D:
Here is the code.
Code: [Select]
<?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>
Error:
Code: [Select]
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
For my poll I am trying to get working D: Wat2do?

Code: [Select]
include $v_path . "poll.php";Are you kidding me?

Code: [Select]
include "poll.php";Saying that it's in the same directory, otherwise use ./dir/ or ../uponedir/

Code: [Select]
include $v_path . "poll.php";Are you kidding me?

Code: [Select]
include "poll.php";Saying that it's in the same directory, otherwise use ./dir/ or ../uponedir/
So I change
Code: [Select]
include $v_path . "poll.php";to
Code: [Select]
include "poll.php";?


Code: [Select]
$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote"; //This is the path from here to the poll.
To:

Code: [Select]
$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote/"; //This is the path from here to the poll.
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.
« Last Edit: November 27, 2009, 08:50:54 AM by Ephialtes »

Code: [Select]
$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote"; //This is the path from here to the poll.
To:

Code: [Select]
$v_path = "/home/tcwildc1/public_html/Heedy/Poll/vote/"; //This is the path from here to the poll.
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.
It embeds correctly but doesn't work when I try to vote.
Code: [Select]
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
Do I have to change permission?

I have no idea what your directory structure is, but try changing v_path to "./Poll/vote/poll.php"

URLs are case-sensitive too.

What about changing permissions. It said something about changing something from 644 to 666 (no stupidness please) for permission.

You're looking to change the CHMOD of whatever file it said.

You're looking to change the CHMOD of whatever file it said.
When I do, it just stops working. When I click an option to vote, nothing happens.

There are so many things you could be doing wrong that it's futile to try and cover all possibility. I'd start over and read the installation instructions real carefully, don't skip anything.

I wish I could remember html *sigh*
« Last Edit: November 28, 2009, 11:27:50 AM by gun fun »

this is php for people who are confused
h ttp://forum.blockland.us/index.php?topic=88744.0
What?

this is php for people who are confused
h ttp://forum.blockland.us/index.php?topic=88744.0
1 word:
Get the hell out

I remember that the Nintendo forums banned the word "php"