On my list of things to do is read the document Handling character encodings in HTML and CSS from the W3C. For some reason I can’t quite bring myself to concentrate on it right now.
Category Archives: Programming
HTML5 and CSS positioning
I stumbled across a weird bug today that I didn’t know about and wasn’t expecting. I’d done a little bit of a CSS file to go with a little bit of HTML that did some simple positioning of content. Then I validated my document on the W3C Markup Validation Service and it complained about a missing doctype. So I added a doctype for HTML5. After I did that my page looked all screwy, the CSS positioning was applying correctly. Anyway it turned out that the reason the CSS wasn’t applying was because I had property specifications like this:
#content {
margin: 170 50 50 50;
padding: 0;
}
Whereas I needed to specify the units, like this:
#content {
margin: 170px 50px 50px 50px;
padding: 0px;
}
PHP heredoc syntax
Today I used the PHP for the first time.
$data = <<<EOF my data EOF; echo $data;
view-source URI scheme
Today I learned about the view-source URI scheme. Check it out!
URI scheme
Reading about URI schemes today.
The UriSchemes page at the W3C suggests a few ways to add support for URL schemes. Maybe I could get file: URLs doing something suitable for SMB network resources in Firefox.
Internet explorer support for file URIs
The URI file://bender-xp/C$/ works in an anchor tag in IE8 to open the \\bender-xp\C$ file share on my network. In this case bender-xp was the name of my local machine but it works for remote file shares too (I tested it to a Samba share on another box).
Unfortunately my version of Firefox (version 9.0.1) doesn’t support this.
PHP error_log
File upload error – unable to create a temporary file in Unknown on line 0
I was working with phpMyAdmin and I got the following error:
File upload error - unable to create a temporary file in Unknown on line 0
The problem was that the upload_tmp_dir setting in my php.ini file was specified twice. Once up the top of the file where I was editing it, and then later in the file where I didn’t see it. So the setting I wanted wasn’t being applied. If you get this error double check you’ve only got one setting for upload_tmp_dir.
HTML to text in PHP
On my list of things to do (at a rather low priority) is learning more about how to convert html to text in php.
Enabling and disabling JavaScript in Firefox
Learning about how to enable and disable script in firefox. Tools -> Options -> Content -> Enable JavaScript.