-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
LOL, thanks It's late in the day here in the UK so my brain is melting, making me come out with this crap.
-
<html> <head> <script type="text/javascript"> var c = 0; var t; var timer_is_on = 0; function timed_count() { document.getElementById('counter').innerHTML = c; c = c+1; t = setTimeout('timed_count()',1000); } function do_timer() { if(!timer_is_on) { timer_is_on = 1; timed_count(); } } window.onload = do_timer; </script> </head> <body> <div id="counter">0</div> </body> </html>
-
Search engine spiders. Get it? I have a phobia of spiders! Now i'll just go and shoot myself.
-
Check the path to the ini file that is displayed on screen via phpinfo(). Are you ammending the correct file? If so you should post this issue over at the apache or linux board as I would be stabbing in the dark at this one. On another note, the reason that using your database to store the contents of a file is a bad idea is because a mysql database should be optimised for quick reads & writes, especially with websites. Using that sort of data type will result in really poor performance if the table were to become very large. Also, managing the files will be a pain because you cannot actually physically move them or a portion of them. On a video tube website (i'm sure you know many) the actual video file data will never be stored in a database, nor user uploaded images. With the number of files that are served on these sites they would grind to a halt. The physical files will be stored on a CDN, something else to look at if you are making these sort of sites. I am not saying that you should go changing all of your websites, however it is something to consider in future projects.
-
OK, you have some issues here. You are not uploading a file, you are taking the file contents from the $_FILES POST array and attempting to store in the database. You should not do this. When you upload a file you should store the actual file on the server. The only thing that you should store in the database is the filename so that you can target it in whatever element (image, flash object, href, etc). Here is a link to a simple file upload script. If you still have a problem then you need to check that your environment variables are correct. EV are the variables set in your php.ini http://php.about.com/od/advancedphp/ss/php_file_upload.htm Very good info on EV http://www.sitepoint.com/upload-large-files-in-php/ If you are uploading files of such a large size, the regular POST method is not the best choice as you would be sat waiting for the browser to finish loading for a long while. Most users would think that the browser has crashed when it is still sending POST data. The server would most probably timeout. A combination of PHP / Ajax / PERL is a good solution where you do not need to set any variables such as upload_max_filesize or max_execution_time. The uploader I would recommend is uber uploader. See if you can get it working on your server. You will need to read the documentation. http://uber-uploader.sourceforge.net/
-
If files smaller than 18M are uploaded without issue it is unlikely to be a problem with your script. More likely an environment variable. What kind of hosting are you using? Can you post the code so we can see where to put the checks in for a successful upload.
-
That's my code. I would also like to add: <?php for($x = 1; $x <= 10; $x++) { print $x; } exit(); ?> <?php /* poor person has no money */ £x = 0; go_around_until(£x is_equal_to 10) { display £x; add_to(£x,1); } goodday(); ?>
-
jQuery drag/drop fails on ie9. Confused about hotfix
JonnoTheDev replied to LLLLLLL's topic in Javascript Help
shouldn't cause any problems. just use it on the page you have the issue with -
jQuery drag/drop fails on ie9. Confused about hotfix
JonnoTheDev replied to LLLLLLL's topic in Javascript Help
I've had this issue. Add the following header to your page: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> -
Many web hosts will setup a dedicated server for you and install WHM / Cpanel or Plesk on it. It's not that expensive IMO but surely the website should pay for itself right? I would not suggest jumping into a raw Linux environment without some experience. I used old PCs and installed CentOs or Fedora on them and played about setting up apache, php, iptables, etc, eventually getting them running as local webservers. On the other hand there are plenty of VPS's available (Virtual Private Server) that will have their own control panel but give you the complete freedom of using the command line to update configs, etc. The cost is lower than a dedicated machine and they are much better than cheap & nasty shared hosting accounts that have lots of users on them. Really you should avoid the likes of WHM for hosting a single site as it is designed to manage many users with hosting accounts, just as shared hosts use it. However, if you are familiar with it and may host additional sites on the same server in the future, there shouldn't be a problem. We have a WHM server that we use to host websites created on our do-it-yourself website builder software. The monthly fees are not large. I think it is actually pretty much the same as our dedicated machines running CentOs, just haggle for a deal on the cPanel license. I think it was roughly about £50 per month for a decent server and then another £10-15 per month for the cPanel WHM licence. That probably equates to about $99 USD per month. http://www.ovh.co.uk/
-
php is all you need. have a look at the examples of the mail function and run some tests of your own on a test script. http://php.net/mail
-
I have a Galaxy S. It's the only Smartphone I have owned and I have no real issues using it. The only thing that made me grumble was battery life but I guess that is because I was used to charging a Sony Ericsson featurephone once every 3-4 days. I think most smartphones require charging pretty frequently especially if you have a heavy session on angry birds. I think it is the closest alternative to an iPhone. I would of liked the iPhone but I would of had to pay for that and I never pay my provider for a phone, especially when I have been with them for 9 years. I would read the reviews, they are mostly positive for the Samsung. Everyone will have their own opinion so I woould simply go into a store and have a play with them and make your own mind up.
-
You cannot start more than one session in the same instance
-
What's everyone been up to in the world of Programming?
JonnoTheDev replied to phpSensei's topic in Miscellaneous
Been doing some SEO stuff using Wordpress. Fu**ing awful system programming wise. -
The variable name used as a function parameter will take the value of whatever is passed into it <?php function arr($word) { switch($word) { case 'modern': include('array1.php'); break; case 'classic': include('array2.php'); break; } } $q = $_GET['q']; arr($q); ?>
-
<?php function arr($word, $include) { include_once($include); echo $something[$word]; } arr('test', 'array1.php'); ?>
-
Sex is by far the best. haha. Very true. However, this is quite difficult to do strictly in a gym environment. :/ Who said anything about a gym
-
Sex is by far the best.
-
Ah, the story has now changed. It was a hoax. Would have been funny if it was legit!
-
Yes I am, no not really. Just moved it, my bad!
-
http://www.bbc.co.uk/news/technology-14370878
-
Download this script. It is a youtube clone. Pull it to bits and you will see how all the upload, conversion, etc is done http://www.phpmotion.com/ The server needs certain software already mentioned such as FFMPEG. The info is all there on the website link.
-
Removing .php in url with php get vars
JonnoTheDev replied to N-Bomb(Nerd)'s topic in Apache HTTP Server
remove RewriteBase / -
THANKYOU PHPFREAKS! Received 1st Place in Canada!!!!
JonnoTheDev replied to phpSensei's topic in Miscellaneous
Well done -
Removing .php in url with php get vars
JonnoTheDev replied to N-Bomb(Nerd)'s topic in Apache HTTP Server
Try adding symlinks into the .htaccess Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^us/([a-z0-9-]+)$ us.php?title=$1 [L] Please take the time to carefully read this tutorial. http://www.easymodrewrite.com/