Jump to content

hchsk

Members
  • Posts

    110
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hchsk's Achievements

Member

Member (2/5)

0

Reputation

  1. how can i fwrite an absolute path file within my website or write a relative path using something like $_SERVER['document_root'] but that seems to not work?
  2. hchsk

    includes

    and why might i get this error message when i attempt an absolute url? a relative path works when i call the page itself, not from an include Warning: fopen(http://www.lowersouthlounge.com/teambonuscheck.txt) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections in /home/.ibycusdryer/cyprinid/lowersouthlounge.com/scripts/report.php on line 39
  3. hchsk

    includes

    how can i include a .php file that needs to be executed and contains relative links, from a different folder, without that screwing up the relative links. (i say screwing up, it's doing what it's supposed to, but in this particular case is not what i want). can exec() be used to do this? i was confused by the php manual
  4. how can i stop my website from being stored in a browsers history. i do not want to disable the back button if possible, but simply to not leave an entry in the browser history
  5. why could this possibly be firing? $warningfeed = ''; foreach($info as $key => $value) { $inactive = (strtotime($value)+259200) - strtotime($nowpub); $inactive = Srtto2Time($inactive); $hold = intval($key) - 1; $warning = ''; if (($value == 3) && (intval($inactive[seconds]) > 0)) {$bits[$key-1] = 0;} if ((intval($inactive[days]) == 0) && (intval($inactive[hours]) < 12) && ($bits[$hold] !== 1)) {$warning = 'Team ' . $key . ' is in danger of inactivity. Less than twelve hours left!'; $bits[$hold] = 1;} if ((intval($inactive[days]) == 0) && (intval($inactive[hours]) < 1) && ($bits[$hold] !== 2)) {$warning = 'Team ' . $key . ' is in danger of inactivity. Less than one hour left!'; $bits[$hold] = 2;} if ((intval($inactive[seconds]) < 0) && ($bits[$hold] !== 3)) {$warning = 'Team ' . $key . ' has been declared inactive. Please contact a judge for shootout details.'; $bits[$hold] = 3;} ///////////////////////////////////////////////////////////////////////////////CHANGE TO TEAM NAMES HERE $category="allevents/team$key/"; //CREATE ITEM $warning if ($warning != '') { $warningfeed .= " <item> <title>Network Update</title> <category>$category</category> <link>http://lowersouthlounge.com/circle.php</link> <description>$warning $bits[$hold] | $inactive[days] | $inactive[hours] | $inactive[seconds]</description> <pubDate>$value</pubDate> </item>"; } } when print "$bits[$hold] | $inactive[days] | $inactive[hours] | $inactive[seconds]" == 3 | 0 | 0 | -11163 thanks so much
  6. i dont understand what the problem is. if its generateing that file, it is echoing them. no?
  7. the foreach loop below is adding to $warningfeed excessively. i have checked, the loop runs the correct number of times, 11. $info is an array of eleven date/times, which need to each be checked if the current date/time is x amount of time away from three days past the element date/time. if so, it should add an item to $warningfeed. Srtto2Time($inactive) correctly creates it's array. $nowpub is the current date/time. $bits is an array of inactivity status' between zero and three, which must be reset if the team is no longer inactive. $warningfeed = ''; foreach($info as $key => $value) { $inactive = (strtotime($value)+259200) - strtotime($nowpub); $inactive = Srtto2Time($inactive); $hold = $key+1; $warning = ''; if (($value == 3) && (intval($inactive[seconds]) > 0)) {$value = 0;} if ((intval($inactive[days]) == 0) && (intval($inactive[hours]) < 12)) {$warning = 'Team ' . $hold . ' is in danger of inactivity. Less than twelve hours left!'; $bits[$key-1] += 1;} if ((intval($inactive[days]) == 0) && (intval($inactive[hours]) < 1)) {$warning = 'Team ' . $hold . ' is in danger of inactivity. Less than one hour left!'; $bits[$key-1] += 1;} if (intval($inactive[seconds]) < 0) {$warning = 'Team ' . $hold . ' has been declared inactive. Please contact a judge for shootout details.'; $bits[$key-1] += 1;} ///////////////////////////////////////////////////////////////////////////////CHANGE TO TEAM NAMES HERE //CREATE ITEM $warning if ($warning != '') { $warningfeed .= $warningfeed . " <item> <title> Network Update</title> <category>$category</category> <link>http://website/circle.php</link> <description>$warning</description> <pubDate>$nowpub</pubDate> </item>"; } } any help, ideas, suggestions, would mean a lot. thanks for your time.
  8. ive discovered a new and much more pressing problem that perhaps you can help me with. i have a file updates.php, which is an rss page generated by php. Within updates.php, i need to add an item that contains a variable gathered by inactive() which comes from an included page inactivity.php. The problem is that the inactive() function needs to search the items of the rss generated by updates.php, and it uses the last pubDate of an item in a chosen category. as is, this creates a loop, that ruins not updates.php, which seems to independently time out and ignore that section of the script, but it ruins another page on my site, which creates individual, smaller feeds based off of the items in a chosen category of updates.php
  9. i know you did! im so sorry. and i fixed the 33. . . by switching the last to < as it should be rather than <= but now i get 22. . . which makes no sense. (intval($inactive[days]) == 0) is false! it ==2
  10. oh wow, silly mistake, somewhere along i had added the ../ that i should not have. thank you for pointing that out. but now it outputs 333333333333?
  11. i dont understand. my filepaths where? its already been demonstrated that all of the arrays are correctly filled, and i'm not overwriting the file yet, i'm just printing a variable! forget about all this code, even this does not work!! : foreach ($nodoubleiw as $key => $value) { $newnodoubleiw = 'whynot?'; } funny thing is that is does in the inline, test.php, but it fails in the rss.php but if i place $newnodoubleiw = 'aha'; right outside of the foeach loop, it works!
  12. i can by testing it outside of the rss with test.php and inline code (but there it works anyway). but i cant in the rss, because the rss will not display if the php prints improper format. but i can achieve what youre asking by assigning those dumps to vars and printing it within an item. the result of that is. . . nothing. it seems like the loop just isnt executing at all. i don't understand it.
  13. i dont think you need to worry about that right now, right now i just need the loop to work, and to be able to print $newnodoubleiw which should == 000000000000, and DOES when this is checked separately. what i will do once that works, is to delete the print command, and instead ////UPDATE NODOUBLEIW.TXT $myFile = "../nodoubleiw.txt"; $fh = fopen($myFile, 'w'); fwrite($fh, $newnodoubleiw); which will overwrite nodoubleiw.txt with the new $newnodoubleiw nodoubleiw.txt is a flat file database that keeps track of inactivity statuses
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.