|
waffle iron posted:At least it's not as bad as storing PHP in a database and then eval'ing. That sounds like a great prank, but I'm sure someone's done it in a real application.
|
# ¿ Nov 13, 2008 20:21 |
|
|
# ¿ May 7, 2024 07:41 |
|
The posting URL needs to point to a WSDL document; where I work, our customers give us URL's that look like this http://soap.example.com/post.asmx but what you want is http://soap.example.com/post.asmx?WSDL That might not be what's going on with you, but it's gotten me plenty of times.
|
# ¿ Nov 28, 2008 17:22 |
|
I hate to sound rude, but you might need to do a little reading about database normalization before you go much further. The issue of putting 'army' and 'navy' in different tables will become clear, you'll prevent lots of headaches, and the project will turn out better.
|
# ¿ Jan 15, 2009 23:11 |
|
J. Elliot Razorledgeball posted:Can I install pdo_mssql on a PHP 4.x Linux installation? At work I use MSSQL on Linux with PHP5 and I had to compile my own package. It's a huge pain.
|
# ¿ Jan 28, 2009 20:25 |
|
I've never even used PHP4 before, but I followed these instructions which helped me a great deal. http://panthar.org/2006/06/15/php-with-mssql-on-ubuntu-606/
|
# ¿ Jan 28, 2009 20:40 |
|
I don't know what exactly is causing that, but if I was typing it then it would look likecode:
|
# ¿ Feb 2, 2009 23:02 |
|
KarmaticStylee posted:are there any programs or websites out there that can scan large php application files such as cakephp or wordpress for lines that send third parties sensitive information? That's a very complicated task. I recommend running a test environment and sniffing the packets that come from it. Or I could say something about reading the code yourself or using code that comes from a trustworthy source.
|
# ¿ Feb 11, 2009 23:33 |
|
I'm not too sure about what you already wrote, but how about using the backtick (`) to execute a command and use its results? As in `ls /home/royallthefourth/porn` Anyone see any problems with that approach?
|
# ¿ Feb 23, 2009 19:46 |
|
VerySolidSnake posted:won't that just open tons of connections to the database? Shouldn't there be a more efficient way to do this? You could try using a database abstraction layer. I use MDB2 and its singleton ability.
|
# ¿ Feb 23, 2009 22:50 |
|
eHacked posted:php 4 Don't do this to yourself. Anything before PHP5 is junk.
|
# ¿ Mar 23, 2009 18:54 |
|
Munkeymon posted:That shouldn't have anything to do with php.ini. Forum data like posts and users ought to be stored in a database somewhere. The setting pointing it to said database would most likely be in a file in the forum software itself. php.ini does have settings that affect DB interaction. I've had MSSQL date format (in php.ini) cause headaches on a Symfony app that took days to figure out.
|
# ¿ Mar 26, 2009 19:24 |
|
Did you check the permissions on those files? Do you just need to copy them in from another directory?
|
# ¿ Mar 26, 2009 19:42 |
|
What is this called? I use it fairly often and I'd really like to have a name for it. "<<<" php:<?php $s = <<< text THIS IS A BUNCH OF TEXT MY FORMATTING IS PRESERVED ACROSS LINES text; ?>
|
# ¿ Mar 30, 2009 18:24 |
|
Treytor posted:Is there any way to pass a variable from one page to another within PHP without it being visible to the end user or using a database? Write to a temp file?
|
# ¿ Apr 2, 2009 00:21 |
|
Any time I'm writing a regex, I test it in my browser first. This thing is pretty slick. http://regexpal.com/
|
# ¿ Apr 25, 2009 14:53 |
|
Anyone ever use dtrace with PHP? If it works well, I may just switch our servers over to Solaris.
|
# ¿ May 20, 2009 17:35 |
|
GNUPlot makes nice graphs in a reasonable time frame. I used it plenty in college and enjoyed it. The website is ugly, but the graphs are actually pretty good.
|
# ¿ Jul 15, 2009 19:32 |
|
What do you get from print_r($_FILES)? Your upload is probably not doing what you're expecting.
|
# ¿ Jul 17, 2009 19:36 |
|
I think I've found itphp:<?php $file = "temp/" . $imagepath; //This must be a typo ?>
|
# ¿ Jul 17, 2009 19:48 |
|
Safety Shaun posted:I'm messing around with the Google Maps API and Google's Latitude and wondered how I would construct a regex to return only "latitude_e6=[NUMBERS-INCLUDING-MINUS-SIGN]&longitude_e6=[NUMBERS-INCLUDING-MINUS-SIGN]" from the fopen() results. Possibly even throw those values into their own variables. http://www.php.net/manual/en/function.parse-url.php
|
# ¿ Jul 21, 2009 19:12 |
|
What does the file look like?
|
# ¿ Jul 21, 2009 19:17 |
|
I'm pretty sure parse_url will do this without any need for regexes. It doesn't actually need to be a URL, it'll take anything formatted key1=value1&key2=value2
|
# ¿ Jul 21, 2009 23:07 |
|
I'm trying to get the output of a shell command and it's only returning the first element of a long output.php:<?php $output = shell_exec('pwgen'); print($output); ?> code:
code:
|
# ¿ Sep 9, 2009 19:07 |
|
ShoulderDaemon posted:Manpages are helpful! Thanks for the tip. I thought I knew how to use the program, but I certainly wasn't expecting this. I don't often write programs that interact with the shell; is this sort of changing behaviour common?
|
# ¿ Sep 9, 2009 21:43 |
|
No, passthru still behaves the same way.
|
# ¿ Sep 12, 2009 18:24 |
|
You could load them into an array and then use array_search.
|
# ¿ Sep 21, 2009 23:01 |
|
Hammerite posted:How about a way to use prepared statements that doesn't use any object-oriented notation? i.e. no -> and no :: Why?
|
# ¿ Sep 22, 2009 15:44 |
|
Hammerite posted:I would like to be able to say that object oriented notation appears precisely nowhere in my site's scripts royallthefourth posted:Why?
|
# ¿ Sep 22, 2009 21:28 |
|
karma_coma posted:Let's pretend I've been writing PHP for a decade now. Let's also pretend that almost none of it has been OOP. Let's then pretend that I want to learn OOP. Is there a great tutorial/book/etc that will point me in the right path? If you want to learn OOP, PHP is not the best language to learn it in. I've messed around with Ruby a little and it seems to be a nice language with a better take on OOP. In PHP, it's more like there's a set of OO features rather than it being an OO language from the ground up. Once you understand OOP, learning how to do it in PHP won't be a problem.
|
# ¿ Sep 28, 2009 17:59 |
|
If you wanna be clever and make something horrible, you could define functions called red(), green(), and blue() and then call them as $color().
|
# ¿ Oct 18, 2009 16:38 |
|
supster posted:jesus did you really just suggest that? I noted that it's horrible. The bullshit I maintain at work has this all over the place. It makes the code nearly impossible to trace!
|
# ¿ Oct 19, 2009 16:11 |
|
Hanpan posted:I appreciate the response, but optimizing is what I enjoy most about coding PHP. This is more of a hobby project more than anything, so I want to make sure I am doing things in the best possible ways so I know how things should be done. The way things should be done
|
# ¿ Nov 11, 2009 21:36 |
|
PHP doesn't interact with the browser; people just use PHP to generate HTML. If you want to do something to change the behavior of the page, use HTML, CSS, and JavaScript. You'll want to head over to the JavaScript thread and ask there, but I'll say right now that I doubt it's possible outside of Flash (which is a poison to the web).
|
# ¿ Nov 23, 2009 18:59 |
|
I like NetBeans and xdebug. You'll need authority over the webserver you're working with, so I recommend running your project locally. Also, print_r all over the place.
|
# ¿ Nov 24, 2009 16:55 |
|
josh04 posted:Speaking of which, what's people's opinion around here with regards to netbeans? I'm a big fan, it's so much less effort than eclipse was to set up and use, but I'm told it's less powerful. I love NetBeans for PHP, but I find it also does great stuff for Java, C, and Ruby. I don't like to use it as a database frontend, though. I also love the CSS editor and the JavaScript hints that tell you about browser compatibility.
|
# ¿ Nov 25, 2009 02:37 |
|
I don't know what to tell you about the database itself, but the classes sound like a task for the decorator pattern.
|
# ¿ Nov 28, 2009 03:26 |
|
You could use the string-as-function feature to call your PHP code based on a function name stored in the database. I realize that's horrible, but it's less horrible than storing an entire function there.
|
# ¿ Nov 30, 2009 21:45 |
|
hallik posted:I have a class with a bunch of methods, and comments in front of each method. Is there a way to grab all those comments in a array or something so I can echo them in an API page? Are you writing actual PHPdoc? If not, it's easy to do and you should start doing it.
|
# ¿ Dec 17, 2009 06:16 |
|
'x' == 0 evaluates to false. Also, isNumeric() is a good function.
|
# ¿ Jan 8, 2010 02:13 |
|
|
# ¿ May 7, 2024 07:41 |
|
gwar3k1 posted:You're putting variables in quotes. I imagine it's printing either "$front" or "$dot_separated" instead of the values of those. Nah, double quotes will use the value of variables you put into them. Single quotes won't, though.
|
# ¿ Jan 13, 2010 18:30 |