-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
Do you get an error in IE? Where the reply states echo out the values: echo $_FILES['image']['tmp_name']."<br />"; echo $_FILES['image']['type']."<br />"; echo($path.$_FILES['image']['name'])."<br />"; echo $_FILES['image']['type']; Does everything look correct?
-
http://i.justrealized.com/2008/10/14/how-to-install-pear-modules-using-xampp/
-
check the fckeditor support boards http://www.fckeditor.net/forums/
-
Have you enabled the filebrowser and upload functions in the config files for fckeditor? Is the directory writeable?
-
Are you running linux?
-
How can I make a page restricted to three daily pageviews?
JonnoTheDev replied to jdock1's topic in PHP Coding Help
If you want a quick & dirty solution, then just set a cookie. Obviously the user could delete their cookies but if you don't have access to a database then your only other option is to use a flat file to record IP addresses. -
Help! Cannot connect to mysql database through Dreamweaver!
JonnoTheDev replied to arjetag's topic in MySQL Help
Ok, a local server. I would guess that your connection string is incorrect. Double check your hostname, username & password. -
export as csv. open in excel and modify the fields. save and re-import.
-
Of course. If you have phpMyAdmin installed on your server you can export all data to CSV format easily.
-
Something along the lines of <?php $path = "/path/to/mp3/folder/"; $dir = dir($path); while(false !== ($file = $dir->read())) { if(!is_dir($path.$file)) { // read the file if an mp3 if(strstr($file, ".mp3")) { $info = id3_get_tag($path.$file); /* will return the following Array ( [title] => DN-38416 [artist] => Re:\Legion [album] => Reflections [year] => 2004 [genre] => 19 ) */ // store the file in the database mysql_query("INSERT INTO table SET filename='".mysql_real_escape_string($file)."', title='".mysql_real_escape_string($info['title'])."', album='".mysql_real_escape_string($info['album'])."'"); } } } $dir->close(); ?> Dont forget to install the extension first
-
I would never spend a great deal of time trying to learn every aspect of a 3rd party script. Chances are you could learn it and then a new version comes out and it's completely changed. If in the long term you have to support it and add new features then there is no way I would go for it. If a client says can you add x,y,z to the site then it is difficult to say if it is someone elses code. Modifying one section sometimes has a domino effect and causes 4 other sections to stop working. Also you have the issue of security. If the script has any weaknesses chances are someone has spotted them and may exploit it (happens all the time) so you are constantly adding patches, etc that may overwrite any modifications you have made. My advice, stick to your own code. If your code library is a bit old then maybe a good option to learn a framework such as Zend, CodeIgnitor or Solar that will speed up developing new applications.
-
Didn't know there was an extension for ID3! nice. Read the files in your directory using php's filesystem functions and use the ID3 extension to get the songnames from the mp3's. Store the filenames/song names in your db.
-
Help! Cannot connect to mysql database through Dreamweaver!
JonnoTheDev replied to arjetag's topic in MySQL Help
This will be because you wont have permission to connect to the database from your public IP. You need to grant access using the MySQL GRANT syntax. Why connect to your database through DW? Can't you write the SQL yourself rather than get DW to do it (DW generates lots of un-necessary crap code) and just upload to the server to test? -
Or PEAR Mail::Mime http://pear.php.net/package/Mail_Mime rather than using all that base_64_encode() and chunk_split() crap.
-
You could import from a CSV file. You will need all song names, filenames in some format.
-
Mysql requires american date format YYYY-MM-DD. Akward aren't they like spelling colour without a u! <?php // 1st nov 2009 $date = "01/11/2009"; $date = implode("-",array_reverse(explode("/",$date))); print $date; ?> or use strtotime() function with date()
-
A method that will set a class property (variable). Getters are the opposite to setters, they get the value of a class property. Setters and getters are magic methods in php5 __set() __get() used for object overloading. Example: <?php class foo { private $data; public function __set($key, $val) { $this->data[$key] = $val; } public function __get($key) { return $this->data[$key]; } } $x = new foo(); // set a value $x->set('name', 'joe'); // get a value print $x->get('name'); ?>
-
not really. dashed borders dont work. you need some proper definition in colour, change the font, add a graphic. you should really look about the internet to see what others do. look at yahoo here with the login module https://login.yahoo.com
-
Wouldn't run through a browser either. Straight into mysql server.
-
Why do you need a script to do this. Also you do not need a loop. Read on MySQL insert select i.e. INSERT INTO albumpicture (albumid, pictureid) SELECT albumid, pictureid FROM picture
-
There are loads of video players that you can download and use. On a youtube style site where users can upload videos the file will get converted into flv format so it can be played back. The original file will then probably get deleted i.e. mpeg. There are server programs that can do this like FFMPEG or MENCODER which you can use within php scripts.
-
[SOLVED] Fatal error: [] operator not supported for strings
JonnoTheDev replied to JREAM's topic in PHP Coding Help
Because the $edit variable must contain a string. Use another variable or change to an array. $edit = array(); while ($query = mysql_fetch_array($result)) { $edit[] = $query; } -
I would also use some colour to define the modules. As the whole container is that brown colour then the text just seems to flow all over the page i.e. Can't really define the area to login on first glance, Do I start reading the text under 'about us' and then continue reading below the image in the centre (kind of like a newspaper article). It seems that the text on the site is just continous. Do you get what I mean?
-
[SOLVED] files requested without extensions
JonnoTheDev replied to JonnoTheDev's topic in Apache HTTP Server
Found the problem. It's multiviews Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec Applied to all directories under the apache document root