Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. corbin, hes using it right.. hes echoing the variables encased in quotes.. for example: echo "$array[$a][$b]"; however, php doesn't evaluate these correctly so he gets Array[4] instead of the values.. he needs to echo them like this: echo "{$array[$a][$b]}"; or.. you know.. echo $array[$a][$b]; (^^ was my edit so people don't judge me without reading the context of my reply lol) but in terms of his use of list() it works I've tested it..
  2. you don't return [3] in that array.. you don't even get to 2 oh I'm sorry I didn't read the rest of the code I just looked @ the function if you're judging off of the echos maybe surround the $whatever[$x][$r] with curly braces { }
  3. try this.. I know this looks like a trivial solution but you really DO need to specify that a variable will be used as an array <?php $myInt = 10; $myVar = array(); $myVar[$myInt] = someFunc($myInt); ?> That SHOULD solve the problem
  4. if ($_POST['on1'] == 'Full admin + $10.00') { $total_price += 10; }
  5. to make this more friendly you'd probably want to do something like: RewriteRule ^articles/(.*?)/.*$ article.php?id=$1 that will turn a url like: http://www.mysite.com/articles/1234/COOL_WAY_TO_DO_STUFF into http://www.mysite.com/article.php?id=1234 transparently.. meaning that url will redirect you to the second url without ACTUALLY redirecting, just showing the content from the second url meanwhile keeping the first url, but this new url rewriting system MIGHT mess up certain things.. such as images and links. be wary
  6. Nooo I wish, I'd want to be one of the gummy ones, and pink! they're the best lol. Please 'solve' the topic
  7. so problem solved? hit 'solved' oh and *admin like voice* Enjoy your stay at our lovely forums, and hope to hear from you again! haha even tho I'm not an admin admins get cool banners n stuff
  8. in the open method you'd specify the whole path.. for example: C:\myZip.zip and it'll save to C:\ but if you just do myZip.zip it'll save into the directory which contains the active php script
  9. I'm sorry I really don't understand you.. try adding me to msn or aim we can communicate better that way. or try rephrasing yourself a bit better in your question
  10. $zip = new Zipper; $zip->open('theZipName.zip',Zipper::CREATE); $zip->addDir('test');
  11. <?php $notepad = new COM('WScript.Shell'); $notepad->Run("notepad"); ?> you can also open a specific file with this: <?php $notepad = new COM('WScript.Shell'); $notepad->Run('notepad /p "whatever.txt"'); ?>
  12. looks like it should work >.>
  13. <?php class Zipper extends ZipArchive { public function addDir($path) { print 'adding ' . $path . '<br>'; $this->addEmptyDir($path); $nodes = glob($path . '/*'); foreach ($nodes as $node) { print $node . '<br>'; if (is_dir($node)) { $this->addDir($node); } else if (is_file($node)) { $this->addFile($node); } } } } // class Zipper this is code straight from the addFile method's reference page the code was made public by "peter at boring dot ch" its not my code, but it would solve your problem
  14. what script ever could warrant inserting 1024 RECORDS in 1 query? :S or do you mean you can't loop and insert more than 1024 records? in this case it is more likely that your php script is timing out set_time_limit
  15. <?php $str = 'loremipsum'; for($i = 0;$i < strlen($str);$i++) if(!($i % 2)) $str{$i} = strtoupper($str{$i}); echo $str; ?> {N} is basically gonna get that offset by 1 which is Nth character in the string.. if (!($i % 2)) which ofcourse is a modulus which checks if there is a remainder after division if $i is 3 which is the loop its in, than it will have a remainder of 1 and thus will be true.. ! is the negator which means it is only looking for false, 0 is interpreted as false, which all together means if there is no remainder in the loop number after division of 2 than uppercase it then set it back that way in the variable which gets the character at said offset.. I also just realised his script does not take into consideration spaces and numbers and other non-alphanumeric characters like my script does, for example .l.o.r.e.m.i.p.s.u.m with his script will return .l.o.r.e.m.i.p.s.u.m where as mine would return: .L.o.R.e.M.i.P.s.U.m or something more relevant: Hey... My name is Russell mine lowercases everything which in his script does not either, aswell. also.. mine would return HeY... mY nAmE iS rUsSeLl and his would return HeY... mY NaMe iS RuSsElL
  16. mine DOES work.. its tested (by me) to work, also, yours looks better so he should stick with yours imo Just don't talk about my code if you haven't tried it. Thanx
  17. <?php $string = "loremipsum"; $string = strtolower($string); $i = 0; $c = 2; $alpha = 'abcdefghijklmnopqrstuvwxyz'; $s = ''; while ($l = substr($string,$i++,1)) { if (strpos($alpha,$l) !== false) { if ($c == 2) { $l = strtoupper($l); $c = 0; } $c++; } $s .= $l; } echo $s; ?>
  18. sweet Thats pretty cool but currently I'm not really having any problems I'm simply curious as to what Shared Memory Blocks are . I'm just gonna solve the topic though because I'm just gonna google around alot thanks mark for replying and teaching me sumfin about php
  19. What does 'scrape' mean.. and what does it have to do with php? and also to help you fix your code to change the links we're gonna need some code to work with here
  20. because you're tryna use css as an attribute to your html.. try style="border: 1px solid #99731E;"
  21. if(!0)$O000O0O00=fopen($OOO0O0O00,'rb'); fgets($O000O0O00,1024); fgets($O000O0O00,4096); $OO00O00O0=(base64_decode(strtr(fread($O000O0O00,372),'wordpesthmDEMHTSRPOWAaBbCcFfGgIiJjKkLlNnQqUuVvXxYyZz0123456789+/=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'))); eval($OO00O00O0); the big waddle of text is that
  22. What do they do? I'm aware you can store data inside of it.. but does it act as a second level of execution 'space' because sometimes I notice I generate a large number of data in a script and when I do in rare event happen to have this problem with a script.. could I store the data inside there and use system memory instead of php's limited allocated memory lol.
  23. if you're gonna use preg_match just create pseudo-variables %{NAME} and then just use str_replace("%{NAME}",$name,$text); and then POW you have inserted dynamic text into static database information without the regex redundancy and evaluating and all the hoopla
  24. you can make a cron job to add all the files you're intending to backup.. into a zip file, then if you installed some ftp server on your computer at home you can connect to that ftp server and send the zip file to your computer reference: ftp_connect ZipArchive-Open Note: ZipArchive::open is correct.. the above depiction is simply to make a valid link
×
×
  • 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.