PHP - Moved: Open A Text File Using Javascript
This topic has been moved to JavaScript Help.
http://www.phpfreaks.com/forums/index.php?topic=320945.0 Similar TutorialsThis topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=317065.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=308625.0 I have a PHP file that is executed via batch file very frequently for live updating. This is a sort of "sync" file for reading/writing to a MySQL database. I am able to get it functioning absolutely fine when executed manually via a web browser (and my echo debug lines output the expected information), yet when I run the same PHP file via the command line, it seems to just not be capable of opening any file for reading, so the equivalent variables that are correct when executed on a web browser are blank when echoed through the command line. Is there a different way of handling reading of files when running a php script via the command line, or should it function exactly the same as when run via a browser? For instance: $k = "0"; $line = file("examplefile.log")[$k]; echo $line; This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=315983.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=345742.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=358359.0 This is my website http://www.rahulkadukar.info/ As you can see I have the blue navigation bar on top and on mouse hover you can see a drop down menu. The contents of the drop down menu can change and I wanted to write a script that would populate the contents of the drop down menus. Which of these is a better option 1. Use JavaScript along with a text file and use JavaScript to populate the drop down 2. Use a SELECT in PHP to populate the drop down menu I am expecting that the 10 main columns would have at the most 20 entries each. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=355719.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=306370.0 Hello, I want to do, when someone click on button/link will open this: but not Save As, but Open. I know how to make simple form: <html> <body> <form action="edit.php" method="post" enctype="multipart/form-data"> <label for="file">File:</label> <input type="file" name="file" id="file" /> <br><br> <input type="submit" name="submit" value="Open"/> </form> </body> </html> But here You must click Browse, but I want to do like in photo: if You click on button, then at once will open form like photo. Many thanks, Tadas P.S. Sorry for my really bad English. hello can i open file with name in another language rather than english. For example торта.jpg. How can i open that kind of file. I've tryed that <meta content="text/html" charset="utf-8" /> <?php $fh = fopen("торта.jpg", 'r'); fclose($fh); ?> but it's don't work. Help me pls! Alright I am so close but can not figure this out, thanks in advance for any help.
So what I am trying to do is take the input variables from a form and have them load a specific PDF .
<html> <body> <?php if( $_GET["startpoint"] || $_GET["endpoint"]) { $a = $_GET["startpoint"]; $b = $_GET["endpoint"]; echo "Your Startpoint is:". $_GET["startpoint"]. "<br />"; echo "Your Endpoint is: ". $_GET["endpoint"]. "<br />"; echo $a,$b,".pdf"; } ?> </body> </html>This is what I have and it works to display what the two points are what the final pdf file should be. The final echo generates the PDF name echo $a,$b,".pdf";How can I get it to load a file using this as a variable or the name it generates, thanks. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342675.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=331038.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=355108.0 Hello all, i am go9090go. Today i made a domains for a jar file people can upload from my website. I made this to make the jar file close source and its easy to update. Now i made a java classloader and everything i made works. The classloader call a php document with the password and username. The pass and name will be checked inside a databse and if its inside i use header() to load the jar file. But when i just go to my main domain i get the index of the site and people can easly download the jar file without have to walk thru the php pass checker. So i want to place the jar file inside a protected folder,and i want that only way you get acces to this jar is by the php file. How can i get a file from a protected folder? here is the php used when the jar file is not inside a protected folder: <?php $DBName = "name";//name database $DBUser = "name";//user $DBPassword = "pass"; //passs $DBHost = "host"; //might be different mysql_connect($DBHost, $DBUser, $DBPassword); mysql_select_db($DBName); $username = $_GET['username']; $password = $_GET['password']; $IP = $_SERVER['REMOTE_ADDR']; $string = "Java"; $pos = strpos($agent, $string); if (!strpos($_SERVER['HTTP_USER_AGENT'], "Java")) { echo("Your Auth has been banned for trying to breach security."); //mysql_query("delete from users where username='$username'"); exit(); } $query = "select * from users where name='$username' and pass='$password'"; mysql_query($query); $num = mysql_affected_rows(); if ($num > 0) { header('Location:script/Script.jar'); } ?> now i want to use the header to a file inside a folder that is protected : so how can i make the header() methode to open script.jar inside a protected folder. The folder haves name and pass: blabla,balbla for exempel thanks for help Hi guys <?php sleep(00); $handle = fopen("http://www.myurl.com/?bla=bla=bla" , "r"); fclose($handle); ?> How do i prevent this from outputing to a file on my server. I only need the url to be accessed to add a new row of data to my DB. Any Ideas? Regards Mark This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=347431.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=329796.0 |