0 users online. Create an account or sign in to join them.Users

Search

The standard upload field has some standard regexp-templates, like image, or document and URI.

What would be the regular expression to disallow certain file-types? For example: everything is permitted, except .php and .js.

this is untested, but you can negate with the carat.

/.^(?:js|php)$/i

I posted that the other day... How come it not here? Weird.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.1
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details