Jump to content
xisto Community

apacheNewbie

Members
  • Content Count

    30
  • Joined

  • Last visited

1 Follower

About apacheNewbie

  • Rank
    Member [ Level 1 ]
  1. I would use file name as check box identifier. So first, we will add checkbox in your code <?php$path = "./";$dir_handle = @opendir($path) or die("Unable to open folder");while (false !== ($file = readdir($dir_handle))) {if($file == "index.php")continue;if($file == ".")continue;if($file == "..")continue;echo "<input type=CHECKBOX name=$file>";echo "<img src='$file' alt='$file'><br />";}closedir($dir_handle);?> That is, now you have images with check box beside them. In order to delete the chosen images, you need to capture which checkbox is selected. This is the example of how to know which check box is checked (assuming, you are using POST method to submit the form using delete button): <?php$path = "./";$dir_handle = @opendir($path) or die("Unable to open folder");//We list the name of the files again, since the name of the checkbox is the same with the name of the filewhile (false !== ($file = readdir($dir_handle))) {if($file == "index.php")continue;if($file == ".")continue;if($file == "..")continue;if(isset($_POST[$file])){ $checkbox = $_POST[$file]; if($checkbox == on) { //checkbox is selected //Delete the file if(!unlink($file)) die("Failed to delete file"); }}?> Hopefully it helps
  2. Not enough memory Overheating Incompatible Driver and .... Windows Yes, windows can crash anytime without any reason
  3. The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.So if you want to get the output ("Hello World"), you need to use Process.getInputStream() method. The method will return an InputStream, which you can use to generate output in your monitor. This is the example of how to print the InputStream: InputStream is = process.getInputStream();BufferedReader is = new BufferedReader(new InputStreamReader(is)); String line; while ((line = is.readLine()) != null) System.out.println(line);
  4. At last, a free SDK for mobile phone.The programming language is java, so it is object oriented and run on a virtual machine.It has nice integration with Eclipse IDE.I hope android can compete with other mobile SDK like symbian, and windows mobile.Anybody download the SDK and trying to make an mobile application with it?What do you think about android?
  5. I think home server is more than just a web server. It can be use for file sharing, email monitoring, or web proxy. It is very nice to use in dormitory
  6. If you don't want to use id, you need to know the sequence number of the form in the display.First, you need to access the form object.With id, you can access the form object by using: document.getElementById('$rs['id'])otherwise, you can access it using: document.forms[<form number>] Because I don't know the sequence number of your form, I will use form id instead. I will use id 'form1' for simplicity. <script type="text/javascript">function news_modify(type){ if(type=='edit'){ document.getElementById('form1').do.value='edit' } else if(type=='delete'){ document.getElementById('form1').do.value='delete2' } document.getElementById('form1').submit();}<form method='post' action='manage.php?manage=news&id='form1'><input type='hidden' name='do' value='' /><button type='submit' onclick="news_modify('edit');">Edit</button> <button type='submit' onclick="news_modify('delete');">Delete</button></form></script> Hope it helps
  7. My first of impression of Byet Host is good. It offers big storage and bandwidth capacity. Its cPanel is nice. Byet Host does not install complete add on for PHP though. That's mean many classes in certain framework (e.g. Zend Framework) will not work. That's why I move to Xisto However, I do not know about its speed. I only use it to test my PHP application.
  8. I think youtube uses flash player to play FLV. It is common to embed flash application in your web site for multimedia.
  9. If you are good at reading source code, try to download Drupal Content Management System, and read their code Drupal is module based, so you can read only the module that interests you. In my opinion, it is better if you develop your CMS library from existing one, instead of creating from scratch. It is too time consuming.
  10. If you can connect to live, then it is possible that your friends who have problem in their connection. May be they forget to open port and do the portforwarding
  11. I still can believe the personality based on astrology. It is kind of strange if astrology is used for predicting the future. Do all humans only have 12 kind of paths in their life?
  12. With VBScript you can use WScript.Network object. The user must activate its ActiveX controls. With normal javascript, I am sure it is not possible, otherwise, it could become a security issue
  13. Well, to connect to multiple PC, you can use switch or hub. I am not sure if that your question though
  14. After this while loop, your str is null Therefore the next line " for(int I = 0; I <str.Length(); I++)" throws exception. May be you need to add another variable as buffer before adding the line to str variable. example String buffer; str = ""; buffer = inputFile.readLine(); while (buffer != null) { str += buffer; buffer = inputFile.readLine(); } System.out.println(str);
  15. I find that this book "Essentials of the Java Programming Language" is good for learning java. You can read it online or download the book from this site: http://www.oracle.com/technetwork/java/index.html Have fun!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.