Re: Script under Windows OK, under Linux, not...

From: Date: Sat, 25 Jan 2003 12:20:15 +0000
Subject: Re: Script under Windows OK, under Linux, not...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133099@lists.php.net to get a copy of this message
It could be somthing to do with my hoster running Linux in Safe Mode... I am not sure what this could entail, so I'll keep looking. Again, if anyone has any info, it would be appreciated!!! Cheers, Daniel "Daniel Page" <dlp@dlpage.com> a écrit dans le message news: 20030125113940.36706.qmail@pb1.pair.com... > Hi, > > I have the following code : > > $_fp = fopen("/home/dh2240/mgt/index.php", "a+") or die(); > $_contents = fread($_fp,filesize("/home/dh2240/mgt/index.php")); > fclose ($_fp); > file://Menu elements > $_sme = strpos("$_contents","sub_menu_elements"); > echo "sme = $_sme<p>"; > ... > > It should display somthing like "sme = 850", after finding the string in the > specified file. > > Under windows, this script works fine (except replacing the > "/home/dh2240/mgt/index.php" by "c:/apache/htdocs/mgt/index.php")... it > seems that the file index.php cannot be opened under linux... > The file is chmod 777, along with the directory /mgt, and the files > identical, but still no luck... The fopen does not die(), but it does not > seem to read any data from the file... I'm confused, and not sure how to > check what is happening... Anyone got any ideas ? > > Cheers, > Daniel > >

« previous php.general (#133099) next »