Jump to content

kdsxchris

Members
  • Posts

    14
  • Joined

Profile Information

  • Gender
    Not Telling

kdsxchris's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm writing a simple custom http web server in java. So far, everything is working great. I want to add support for cgi scripting, and the biggest problem is how to tell php what the headers and other get/post information is. I can read post/get information within java when a request from a client is made. I can also use java to call the method php-cgi.exe to execute a php script. However, if the php script requires post information, (ie: <?php echo $_POST['username']; ?>) I do not know how to pass this information along to php. Does anyone have any idea how a normal webserver, like apache, tells php what the post information and other headers are?
  2. I'm having a little trouble with approaching a database searching problem. Lets say I have a database abstraction layer that I plan to work with Mysql, Sqlite, Access, Oracle, etc. In addition, I need to search through the TEXT fields. These records could be huge, like posts you might see on a forums board. What is the best way to design a solution that will let me search (the most efficient way) through huge text records, but might be in mysql, sqlite, etc? I have a sql class that lets me do queries and takes into account for differences between some database systems (like with "limit" and "like"). I could create a function that would return a link to a resource with the records. How different are major database sytems with indexing the text fields?
  3. I checked for whitespace and all of that...I'm really stumped on what to do. I'll just it the old fashioned way now...
  4. And how are you called the method?
  5. It's saving a string to a variable...http://us2.php.net/types.string I wrote my own code that gave a similar error, so to be sure I wasn't insane I copied and pasted code from the php doc website and even that didn't work. I know I'm writing in correct syntax, but the parser says otherwise...
  6. I didn't test this, but I think when you use mysql_query to retrieve the data, it will return the data the way it was BEFORE any mysql_escape_string, so it will return it the way you want as in $rawtext.
  7. <?php $bar = <<<EOT bar EOT; ?> I get the error "Parse error: syntax error, unexpected $end in FILE on line 4" I've done this a thousand times and I'm about to die. What am I doing wrong?
  8. I want to let my php application support multiple languages in the future, but I'm really stuck as to how to design the application to do so. Has anyone else here dealt with a similar problem, and if so, how did you deal with it? I plan on using mysql, but plan on support multiple database schemes.
  9. I know what is it, but what I don't know is "how to implement" it. Does it simply mean making all of my databases unicode (not the default latin for mysql, for example) changing all my file formats to unicode, etc? Or do I have to provide code that somehow handles and does something to "make my application unicode compatible"
  10. If I was to make a web application written in php "unicode" compatible, what exactly does that mean and is it hard to achieve? For example, wordpress is unicode compatible, but phpBB is not.
  11. For designing a large php application, when it comes to speed and overall efficiency, which should be used, the identical === or equals == operator? I like the === operator, because it is type safe and I'm real careful about type safety after using Java and becoming certified in it with all of the type stuff in Java...
  12. I had the same problem with javascript just today and the fix was almost the exact same thing. I'm just used to java regex methods too much I guess... Thanks.
  13. When I used the following code I got the following error: echo preg_match ('[a-z]{2,6}', 'ccc'); If I used the ereg function, I get no error the results I want. Does PCRE not allow the { quantifier thing? PHP version 4.4.7
×
×
  • 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.