•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,572 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,618 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 652 | Replies: 4 | Solved
![]() |
•
•
Join Date: Oct 2007
Posts: 37
Reputation:
Rep Power: 2
Solved Threads: 0
Having a strange problem with some PHP code.
This code:
writes the file TOPAShiftlog2007-10-26_AShift.rtf to the /u2/text dir.
I want it to write 2007-10-26_AShift.rtf to the /u2/text/TOPAShiftlog dir
so I tried this:
This code ends up removing my "submit" button altogether. I don't understand why the / is causing the problem. Here is the meat of the code:
Any ideas would be appreciated
DS
This code:
$filename = "/u2/text/TOPAShiftlog".$dateString."_AShift.rtf";
I want it to write 2007-10-26_AShift.rtf to the /u2/text/TOPAShiftlog dir
so I tried this:
$filename = "/u2/text/TOPAShiftlog/".$dateString."_AShift.rtf";
This code ends up removing my "submit" button altogether. I don't understand why the / is causing the problem. Here is the meat of the code:
$filename = "/u2/text/TOPAShiftlog/".$dateString."_AShift.rtf";
$handle = fopen("$filename","w");
$date1[$i]=$row['date'];
$message = "Station Log ";
$message = $message."Date: ".$date1[$i]." \n" ;
.....
$message = $message."\n\n";
if(!fwrite($handle, $message)){
print "Cannot write to file";
exit; }
#print "Success, wrote ($message) to file ";
$message = "";
fclose($handle);
$i++;
}
?>
</table>
<br><input type = 'hidden' name = 'todaym' value = <?=$todaym?>><input type = 'hidden' name = 'todayd' value = <?=$todayd?>><input type = 'hidden' name = 'todayy' value = '<?=$todayy?>'>
<input type='submit' name='Submit' value='Submit'>
</form>Any ideas would be appreciated
DS
When you do a view-source on the page, what is the output?
Need a simple, powerful knowledgebase? Bigattichouse Knowledge Base finds the solution while you're still typing the problem.
http://www.bigattichouse.com/knowledgebase.html
http://www.bigattichouse.com/knowledgebase.html
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- While I am Downloading ,One Dialogbox will open.When user will be saving file name... (ASP.NET)
- php download a file without redirecting (PHP)
- php.ini file not being read (PHP)
- Saving a file using C++ (C++)
Other Threads in the PHP Forum
- Previous Thread: Can PHP talk to a VB msmdb?
- Next Thread: multiple update with text boxes


Linear Mode