jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
No, it wasn't the latest version of firefox, 4.something...when I updated with the latest one the result was the same. For example, on my CentOS machine I'm using the latest version of firefox without any problems.
-
-
I mean, it's rendering the output as html content rather than displaying the html source code as a plain text. That's why I'm getting confused.
-
Hey guys, does anybody use "windows" and "firefox" for web development? So, here is the issue. I decided to install a "windows" system (VISTA) inside my virtual machine.Then, I created an index.php file on the desktop (without a web server and php at all). Inside this index file I've created a html h2 tag with the text <h2>Hello World</h2>. When I open the file through firefox I see the output like html? Why? Is it normal for windows and filrefox? I'm confused. The cache in the browser is disabled.
-
Or.....I would suggest another method. When the form has been successfully uploaded to the server, create a new file containing an information of this form (subject, body, mail, e.g) which you want to send to the user. Then, start a cron job to boot this file every minute, when the script is being executed once by cron re-write a file to return a false result, to prevent the script to be executed twice.
-
pl upload unable to accept big dimension .gif file
jazzman1 replied to sasori's topic in Third Party Scripts
Hey sasori, just create a custom function and bind the plupload "FileUploaded" method to it. Check if all files are successfully uploaded on the server and the status of this connection is equal to 200. Then pass this custom function to preinit. So, it would like something like: // added redirect function after uploading was successfully function attachCallbacks(uploader) { uploader.bind('FileUploaded', function(Up, File, Response) { // count total of uploaded files var u_count = uploader.total.uploaded; // get the length of uploaded files var f_length = uploader.files.length; // check the status and status of failed uploaded files if(!uploader.total.failed && Response.status == 200) { // redirect the page after successfully uploading images if((u_count+1) == f_length) window.location.assign('http://www......'); } else { alert('Failed uploading'); return false; } }) } All script: <script type="text/javascript"> // Convert divs to queue widgets when the DOM is ready $(function() { $("#uploader").pluploadQueue({ // General settings runtimes : 'gears,html5,flash', url : 'index.php?action=upload', max_file_size : '1mb', chunk_size : '1mb', unique_names : false, // redirect mod preinit : attachCallbacks, // Specify what files to browse for filters : [ {title : "Allowed files", extensions : "jpg,gif,png,txt,doc,docx,pdf,zip"} ], // Flash settings flash_swf_url : 'js/plupload.flash.swf' }); // Client side form validation $('form').submit(function(e) { var uploader = $('#uploader').pluploadQueue(); // Files in queue upload them first if (uploader.files.length > 0) { // When all files are uploaded submit form uploader.bind('StateChanged', function() { if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) { $('form')[0].submit(); } }); uploader.start(); } else { alert('You must queue at least one file.'); } return false; }); }); // added redirect function after uploaded function attachCallbacks(uploader) { uploader.bind('FileUploaded', function(Up, File, Response) { // count total of uploaded files var u_count = uploader.total.uploaded; // get the length of uploaded files var f_length = uploader.files.length; // check the status and status of failed uploaded files if(!uploader.total.failed && Response.status == 200) { // redirect the page after successfully uploading images if((u_count+1) == f_length) window.location.assign('index.php'); } else { alert('Failed uploading'); return false; } }) } </script> -
Where you stuck?
-
Then, pass the commands to the a.php file through a shell terminal, using for instance shell_exec().
-
which php or whereis php Yes, the script is written to run some other commands from test.php file. Make sure they are on the same directory.
-
Use absolute paths to your stylesheets.
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
Getting a users rank from a mysql table with PDO
jazzman1 replied to mediabob's topic in PHP Coding Help
Yes, master, got it....but what about the user with lowest rank named "Barand" If I run next query, "Barand" is getting rang 8 instead 4. SELECT COUNT(*)+1 as 'rank' FROM mydb.users WHERE score > ( SELECT score FROM mydb.users WHERE users.UserID= -
Getting a users rank from a mysql table with PDO
jazzman1 replied to mediabob's topic in PHP Coding Help
Or....try to use ALL SQL operator instead to add +1 and everytime to assign new $uid. No....it's the same, b/s we have single output. SELECT COUNT(*) AS `rank` FROM $table WHERE $table.score >= ALL ( SELECT $table.score FROM $table WHERE $table.id=$userID) -
Hire someone to solve the problem, obviously you're unable to fix it yourself and so lazy to read the articles which I sent you above.
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
Why does this always give same result, even when table is empty?
jazzman1 replied to CGTroll's topic in PHP Coding Help
The php mysql_query function just send this sql statement to mysql database. The database check wether this statement is true and return the result back to php. EDIT: Zero or NULL will be correct results too! -
@objnoob, re-read the Barand's reply above. These mysql date/time functions should work only if the date field is under date/time type in mysql!
-
Why does this always give same result, even when table is empty?
jazzman1 replied to CGTroll's topic in PHP Coding Help
Why? The "!" NOT operator is enough! It will returned true (error) if this SQL Statement is not true. -
No, the first backslash should be optional! Change: RewriteRule ^/productdetail/([^/]+)$ productdetail.php?prodid=$1 [L] TO RewriteRule ^/?productdetail/([^/]+)/?$ productdetail.php?prodid=$1 [L]
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
The URL and the rewriting rule are correct. Make sure you get a correct result of your php script as well. Can I see the web structure of those files involved in this issue?
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
You don't need to have internet at home neither а home network to send emails locally. Just install VmWare or VM Virtual Box by Sun software as Irate mentioned above, then install two linux distros inside this virtual box. Make a connection between them and simulate a real network. You can create samba, ftp, http, mail servers and so on, so on... for your training purposes. That's all and free of charge
-
Well, it's still wrong No, the last backslash is optional. That one is correct.
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
A div element doesn't support the HTML value attribute. So, if want to grab a text between <div></div>, you would use next: str = document.getElementById("select_data").firstChild.nodeValue; OR str = document.getElementById("select_data").textContent; What debugging tool are you using to help quickly discover the cause of an issue and fix it efficiently?
-
Wrong pattern! Re-read my reply #25 again!
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
Any previous experience with VM (virtual machines)?
-
Wow....this is so complex for my old head Everything you need to do is converting the data/time string to an unix timestamp integer number. I was thinking for something simple like: $cur_TimeStr="2013-09-02 22:05:39"; $last_TimeStr = "2013-09-01 22:05:39"; $TimeInt = strtotime($cur_TimeStr) - strtotime($last_TimeStr); $hrs = $TimeInt / 3600; echo $hrs; // 24
-
This is not unix timestamp format, the "timestamp" is just a big integer. You can "google" how to convert this data/time format to unix timestamp and then apply this subtraction. You could also consider using Data/Time MySQL Functions