Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JasRonq

Members
  • Joined

  • Last visited

  1. or just go download a few screen readers and any other related programs and see where they mess up.
  2. Here is the finished product. move_uploaded_file($_FILES['file']['tmp_name'],$uploaddir.str_replace(" ", "_", trim(preg_replace('"[^0-9a-z]"'," ",strtolower(substr($_FILES['file']['name'], 0, strrpos($_FILES['file']['name'], ".")))))).strstr($_FILES['file']['name'], ".")); It will completely sterilize a file name down to alpha-numeric and underscores for all interior spaces. Any symbols in the name are turned into underscores and no spaces or underscores are left before or after the name. it even removes spaces and symbols from between the extension and the name.
  3. No, in fact I am using rawURLencode to turn them into these symbols because then I can search by a pattern to find them and delete them. Or I would if I could get the syntax right. EDIT: yeah, a good reply! Thank you so much for clarifing. One thing though, the two digits are in hex so 0-9 wont catch the letters... can I use [A-Fa-f0-9] to get it? Edit: I got it working beautifully and I'm cleaning up my code now. Thank you for the help.
  4. I am trying to use preg_replace to replace all percent encodes (%20, etc) with underscores. I cant figure out the pattern syntax though, it confuses me to no end. Basically, I need it to find all % chars and strip that char, plus the next two char, and replace those three char with an underscore. Anyone got some experience using this pattern system?
  5. I have a private (.ht* protected) directory on my site now that I am using to store files and develop web apps not ready to go live. I noticed that the default Apache directory listing which is still currently in use has a column "Description" for the files. How do I edit the info that is displayed in this column? Currently I have none shown, wasting a perfectly good place to give info on what the files in the list are. (I do want to continue using the default index from Apache, at least for now, and would like to know how it works regardless of my eventually writing my own indexing scripts.) Btw, thanks for the help in my last thread making the directory private. PS. I am on a hosted server, so I don't think I have access to the Apache config file or have direct control in general over the software I am running on the server.
  6. I have a development area on my site for messing with new versions of things and whatever else that isn't ready to go public, It's not super secret but I'd like to password it so people don't somehow wander in (though there will be no links posted, they would need to have the URL.)
  7. it also occurred to me that if they were in the database, search engines would not find them, only the pages they are included in. or am I wrong?
  8. I read this earlier and it shows a way of keeping images in a MySQL database. I was wondering, in the context of a photoblog or gallery site, if keeping the images in a database would speed or slow the site compared to just keeping them in folders?
  9. ...or you could actually update the links. its a simple find and replace command. it'll take you ten minutes
  10. But which incurs more overhead? Keeping in mind that the arrays would be on the order of a half dozen to dozen key/value pairs. Also, in many cases, I foresee needing the whole array. ie, post data in a blog, id need the author, date, tag list, etc. rather often, not just one element.
  11. mostly because I want it to all be together in one place. A database requires making calls to the database server and for tech illiterates is more difficult to back up because you then have to make a database backup too. If all the data is stored in files then the user can just copy the whole thing, data, content, and software together and save it to their computer as a backup. Are there any major reasons not to do it this way instead of just using MySQL? EDIT: would it cause a performance hit to do it this way? btw, I also just discovered the JSON encode and decode functions which seem an even easier way of doing this.
  12. I want to use a .txt file to store small amounts of data such as preferences set my the admin or other data. It would all be easy to represent in arrays with the option name as the key and the option set as the value. I want to use a simple format in the text file such as Key: Value on each line. How might I parse this properly as all the ways I have found in the functions list to load in a file to an array such as file() load it with integer keys and would put the whole line as the value. I want to specify the key and value in the file. EDIT: its amazing how fast you can find an answer on your own once you ask someone else for it. it looks like what I want to do is use = as my delimiter and use the parse_ini_file function. Any additional advice would be great though if I'm overlooking anything.
  13. Suppose there were a CMS that uses PHP scripts and YAML formated files to hold data in. Assuming this were appropriate storage in the first place for the data, would this be advisable if the site using such a setup received large bursts of traffic? How much traffic at one time might break the site? Are text files as data storage even a concern in comparison to the webserver load?
  14. My wife and I are planning on creating a website that work sort of like a webcomic site (i.e. http://questionablecontent.net/ ). The pages we plan on creating include a main content page where the current post is viewed and previous posts can be navigated through with Forward, Back, First, Current, and Random buttons. Each post would be a part of a story my wife will write and be accompanied by an illustration by me. I want a gallery page that can be navigated through with the same control scheme as the posts. There would also be a news page that would work similarly to the main post page, showing the latest posted news. The rest of the site would be static. Oh, and there would be a sidebar with links to each story by wife writes (after there is more than one), the same side bar would also group my art in the same way as in illustrations from each story, and it would also be used to group the news by month. I think the above is a fair idea of what we want to create. What I need to know is this, do I need to use a database to implement this? Do I use PHP to code the pages to show what the user wants (code the functionality of the button navigation?) I have a fair idea of what I want to do and very little idea of what to do it with.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.