<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Tue May 21, 2013 2:36 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Tue May 21, 2013 2:36 pm</pubDate>
  <lastBuildDate>Tue May 21, 2013 2:36 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>PHP Project 1</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=91077#91077</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=66759'&gt;sirobert&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 21, 2010 10:57 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      yup, running the script as me and the owner and group is me. I think it might be something to do with the output buffer commands as the instructions say that the output to the screen should be suppressed if its going to the buffer.&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=91077#91077</comments>
                                        <author>sirobert</author>
                                        <pubDate>Wed Jul 21, 2010 10:57 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=91077#91077</guid>
                                      </item>
                                      <item>
                                        <title>Re: Project 1 - PHP coding</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=91072#91072</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=23984'&gt;bobthebob1234&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 21, 2010 8:31 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;sirobert wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;nothing is written to the output file.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
I assume you are talking about&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&lt;br /&gt;
file_put_contents&amp;#40;&amp;quot;output&amp;quot;,$output&amp;#41;;&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Does the user you are running the script as have permission to write to the file 'output'?&lt;br /&gt;
&lt;br /&gt;
If the file 'output' doesn't exist does the user have permission to create and write a file?</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=91072#91072</comments>
                                        <author>bobthebob1234</author>
                                        <pubDate>Wed Jul 21, 2010 8:31 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=91072#91072</guid>
                                      </item>
                                      <item>
                                        <title>Project 1 - PHP coding</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=91070#91070</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=66759'&gt;sirobert&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 21, 2010 7:51 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I'm attempting the first php project, but the output to buffer commands arn't working. The files are still output to the command line, nothing is written to the output file. What am I doing wrong?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
    Simon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function subdir_scan($dir){&lt;br /&gt;
  $files = scandir($dir);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  foreach ($files as $file){&lt;br /&gt;
    if($file==&amp;quot;.&amp;quot;) continue;&lt;br /&gt;
    if($file==&amp;quot;..&amp;quot;) continue;&lt;br /&gt;
    print &amp;quot;$dir/$file\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    if(is_dir(&amp;quot;$dir/$file&amp;quot;)){&lt;br /&gt;
      subdir_scan(&amp;quot;$dir/$file&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
chdir(&amp;quot;..&amp;quot;);&lt;br /&gt;
ob_start;&lt;br /&gt;
subdir_scan(&amp;quot;.&amp;quot;);&lt;br /&gt;
$output=ob_get_clean();&lt;br /&gt;
echo $output;&lt;br /&gt;
file_put_contents(&amp;quot;output&amp;quot;,$output);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=91070#91070</comments>
                                        <author>sirobert</author>
                                        <pubDate>Wed Jul 21, 2010 7:51 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=91070#91070</guid>
                                      </item></channel></rss>