three doubts, about read_file, htmlentities and tiny mce |
[eluser]jozeunico[/eluser]
Well, hello everyboady again, sorry about my english and thanks. And here's my task list 1.-I have a problem when I try to read a file if the file is empty, CI return "false" for example I did it this: $string=read_file('./system/application/views/info/some_view.php'); if ($string==false){ echo 'ERROR al abrir el archivo carnal'; } else{ echo $string; } some_view.php exists and the rute is correct (I tested with other files in the same path) But THE PROBLEM is when the file is empty. Somebody have any idea to solve the problem when the file is empty? I mean I want to "show" the file content even if it's empty. It's because i use a tinymce 2.x to edit the file content, but sometimes the file can be empty. And a couple of doubts,I mean questions: 2.- Somebody know a plugin to embed a flash mp3 player that works with tinymce 3.- Can I use htmlentities to save strings with html tags into DB?
[eluser]Spockz[/eluser]
On the first. Try: [php] if ($string === false) { ... [/php On the third note. Please please read some papers about sql-injection. Luckily CI does a lot for you, however. It is good to know about the reasons of things. I.e. http://www.ngssoftware.com/papers/sqlinference.pdf
[eluser]jozeunico[/eluser]
[quote author="Spockz" date="1213153012"]On the first. Try: PHP Code: if ($string === false) { On the third note. Please please read some papers about sql-injection. Luckily CI does a lot for you, however. It is good to know about the reasons of things. I.e. http://www.ngssoftware.com/papers/sqlinference.pdf[/quote] Thanks, the first it works(and it was the most importan for me), about the third , i will read and I expect understand it,and it's true CI help me a lot. Tnank you Spockz. |
Welcome Guest, Not a member yet? Register Sign In |