
TimString
Members-
Posts
13 -
Joined
-
Last visited
Everything posted by TimString
-
OK. With a sufficiently narrow Google query, I found the answer. Should anyone come along to read this thread, here's the code I borrowed that worked: <form enctype="multipart/form-data" action="ImportTOA.php" method="POST" accept="text/csv"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Upload Daily TOA Logs: <br /><input name="userfile" type="file" onChange = "this.form.submit()" /> </form>
-
Sorry, I did not mention at all what I'm trying to accomplish. I'm not trying to upload a file. There are many tutorials on that. All I need is to pass a file name from the form to my php action script, and let the script fold, spindle, and mutilate that file to put it into a MySQL database. The form calls up the file dialog, but doesn't pass the file name that is selected.
-
No, I never said that localhost was a folder. localhost is the root directory of my website, the same as 127.0.0.1. Every URL I have ever seen starts with the root directory. i.e. www.micro$oft.com, www.apple.com. If you were to go to my website across the wide expanse of the web, you'd get www.thissiteislocked.com/index.html which is nothing more than two links leading to two different folders. Or, you'd get the same results with 74.??.###.95. In other words, you'd end up with www.thissiteislocked.com/dispatchreports/index.php . Since the index.php or index.html files are at the root level of the web address and are what the web is looking for one or the other when a site is browsed, they can be left out. The folder I'm trying to write to is www.thissiteislocked.com/dispatchreports/dispatchreportsfolder/ . Since I am not going across the internet to get to my site, the URL I have to use is localhost/dispatchreports. I tried that earlier per your suggestion and it didn't work then. I also tried "Library:WebServer:Documents:DispatchReports:DispatchReportsfolder:", which is the pathname that Mac and unix boxes use, with the same results. The problem is not in the path itself. I have tried several path names, and I am told that I don't have write permissions to my folder. I have had a trap that looks to see if the last folder exists, and now, the directory folder already exists and the trap is not triggered. I have no idea why the php script will write to 'localhost/dispatchreports', and not to 'localhost/dispatchreports/dispatchreportsfolder' when both have identical permissions. I have even tried the evil "everyone read/write". From what research I have done lately, the problem lies in Apache. I have tried several "solutions" and none work. I was hoping that someone here has had the same problem.
-
The absolute path to this directory is /Library/WebServer/Documents/DispatchReports. In other words, localhost/dispatchreports. How does this exercise help me?
-
localhost/ is the equivalent to www.whereshallwego.org/ and is a valid starting point. With that said, I have tried all sorts of path designations including '/DispatchReportFolder/' and '/DispatchReports/DispatchReportFolder/ but none work.
-
I have tried both ways. The first thing in the routine is if the folder doesn't exist, create it. The mkdir command does not do anything. If I create the folder in Finder, I get the same results. Yes, localhost is usually the root web server
-
I have these lines in a php script: passthru("whoami"); $tims_path = "localhost/DispatchReports/DispatchReportsFolder"; if ( !file_exists($tims_path) ) { mkdir ($tims_path, 0777); } if (is_dir($tims_path)) { die( "timstring, you cannot use fopen on a directory path." ); } //if the path is a directory and you want to put a new file there, you'll need to first check if it is writable: if (!is_writable($tims_path)) { die("timstring, " . $tims_path . " is not writable so you will not be able to write anything to it"); } $FileName = $tims_path . $System . ' ' . $EndMO . '.csv'; $fh = fopen($FileName, "w"); No matter how I write tims_path, mkdir won't create the folder. if I create the folder in finder, if (!is_writable($tims_path)) returns that the folder is not writeable. I have tried many many many combinations of permissions on the target folder and nothing has worked. HELP!! tim
-
I have a session variable named 'ticktock'. I need to have ticktock set to "" at the top of the last page in the chain. I have this code at the top of the first page: <?php session_name("PassTech"); session_start(); session_destroy(); ?> This is the code I have in the last page: <?php session_name("PassTech"); session_start(); unset($_SESSION['ticktock']); ?> No matter what I've tried, ticktock won't reset. What's going on? tim "If builders built buildings the way that programmers write programs, the first woodpecker to come along would wreck civilization."
-
yes, my table tag is closed. However, your suggestion worked. tyvm, tim
-
Barand, that didn't work, or I have misunderstood you. Here's a link to my site:http://bryanrails.zapto.org/rails use 41146 as the tech number and the password is "test" When you get to the Enter Display Channel, pull the drop-down menu to Bryan, TX and enter 69 in the top box. thanks for the help tim
-
http://bryanrails.zapto.org/rails/screenshot.gif
-
Yes, it is tabular data generated by a PHP script and setting both columns to 50% didn't help. I did manage to get a screen shot posted thanks for the reply
-
I have a simple php table of two columns. The left column is aligned right, and the second one is aligned left. For some reason or another, I can't post a screen shot. How do I get the space between those two columns aligned with the center of the page? Here's the code for the first row: echo "<table border = 0 width = 100%"; echo "<tr>"; echo "<td style='text-align:right; padding:3px 3px 0px 3px; Border:2px; font:15px Arial, sans-serif'>System:</td>"; //top right bottom left echo "<td style='text-align:left; padding:3px 3px 0px 3px; font:15px Arial, sans-serif'>" . $System . "</td>"; echo "</tr>";