blackcell Posted April 15, 2010 Share Posted April 15, 2010 [php: 5.3.1] Ok, an hour later I am so pissed I can't think straight enough to tell somebody the difference between = and ==. I just installed latest version of xampp. Trying to run a script through php.exe via command line and it only echoes my code back to me. I try to run it through browser and get this:Successful write"; }else{ echo " Failed to write"; } fclose($fp); ?> Here is my code: <? $html_file = "test.html"; $fp = fopen($html_file, "w+"); if(fwrite($fp, "TEST")){ echo "<br />Successful write"; }else{ echo "<br />Failed to write"; } fclose($fp); ?> I am almost certain there is some sort of magic quotes setting or some crap in the php.ini file. Right now I have these set accordingly: php.ini magic_quotes_gpc = Off ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. ; http://php.net/magic-quotes-runtime magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with '' instead of \'). ; http://php.net/magic-quotes-sybase magic_quotes_sybase = Off Any shoves in the right direction or something? Quote Link to comment https://forums.phpfreaks.com/topic/198684-configuration-problem/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 15, 2010 Share Posted April 15, 2010 Don't use short open tags in your code (ever.) Short open tags were a lazy-way short-cut that has ended up wasting several orders of magnitude more time then they ever saved in typing time. How much time have you spent on this problem so far? Quote Link to comment https://forums.phpfreaks.com/topic/198684-configuration-problem/#findComment-1042667 Share on other sites More sharing options...
blackcell Posted April 15, 2010 Author Share Posted April 15, 2010 Hey thanks for the lecture and solution. That was it. Again, I appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/198684-configuration-problem/#findComment-1042688 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.