|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-11 14:18 UTC] mj@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jun 16 22:00:01 2026 UTC |
Description: ------------ This function will not write to the file. It works find as regular code. I also could not create a working function containing a few if statements. Reproduce code: --------------- function tablewrite(){ fwrite($fh, '<td><div align=center>'); $text = $leadnum2; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $date; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $visitorip; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $referer; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Name']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Move_Date']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['City_From']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['State_From']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Zip_From']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['City_To']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['State_To']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Phone']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Email']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Move_Size']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Additional_Comments']; fwrite($fh, $text); fwrite($fh, '</div></td></tr>'); fwrite($fh, $newline); fclose($fh); } Expected result: ---------------- write a new line to a table. Works fine as regular code. Actual result: -------------- does not write.