Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Peter Chant
January 18, 2006, 12:40 am
rate this thread
I'm using php and mysql with apache both on Slackware linux and also Windows
using phpdev. I developed the code on the linux system. On phpdev I've
found that glob and mysql_real_escape_string do not work. I've created
workrounds for this on phpdev. The question is, is there a reliable way to
detect the OS so I can use the workrounds on phpdev only, or am I better
off using the workround on both phpdev where it is needed and under linux,
where it is not?
I assume that the most reliable way to detect the server OS is to look at
the Apache version, after finding out how phpinfo() gets this and looking
for (Unix) or (Win32) in the returned data.