require in functions.php in local wordpress does not work

I'm working on a wordpress theme locally using MAMP on Mac. It seems to be giving me a 500 error no matter what line I try. I'm trying to require the /inc/customizer.php in the functions.php file. This is a wordpress theme I'm building from scratch.

I can not include my header

<?php require('../includes/config.inc.php'); include ('../includes/header.html'); $page_name = NAME; $page_title = 'Home'; ?> <div style="background-color:green;" class="container"> <div class="section"> <

Best way to call code in a module in nodejs

From a performance perspective, is there any difference between invoking code by wrapping it in a function and then exporting it: function doSomething () { // doing something here } module.exports = doSomething(); And just requiring it without any ex

GitHub Electron: build the menu in the required file

I am seasoned in JavaScript, but very new to node and to Electron. I am trying to piece the technique together from code samples and what documentation I can find. I would like to include my menu code in a separate file. The main code is in a file ca

how to pass a string / object in a need

I want to pass a string in javascript module module1.js var currency = 'dollar' module = require('./module2')(currency) How can I do that because right now I have this error TypeError: string is not a function e=[TypeError:string is not a function] T

Require is not recognized in the NodeJS application

I have followed the steps from here http://expressjs.com/en/starter/installing.html to install express NodeJS application. After installing we moved to "myapp" directory and then we have installed "aws-iot-device-sdk" from https://gith

Fatal error class not found

Good night. Please excuse me for my english, I'm from Costa Rica... I am working with PHP POO and I have a problem. The error is the next: Fatal error: Class 'mysql' not found in /home/casa/public_html/guaria/clases/verificaSesion.php on line 15 All

Get the path of the parent requiring a file, Ruby

Is it possible to get the location of the file which requires another file in Ruby? I have a project where I spawn some processes and I would love to be able, in the code, to determine which file is the parent of the required file. This is nice when

PHP - MySQL security issue?

Just wondering is this could be a potential security problem with MySQL and PHP: I have a connect.php file on a server, if someone used require(http://myurl.com/connect.php/);, would this allow them access to my database? Thanks in advanceNo, but for

Solve dependencies between jQuery and jQueryUI with dojo

First of all, I'm using a custom build of dojo framework (v1.9.0) done with build.dojotoolkit.org/, with my required modules, included the loader module. I have a question related to the dojo.require loader and the jQuery framework. The main question

Where to place javascript events in AMD modules?

I am in the process of converting a massive .js file into AMD modules using requirejs I realise the concept about returning function and such which are much link classes, however, how do I handle events such as: $('blah blah').onClick( ... $('blah bl

Use require in the node without the code and not a file

I have code in a database that has different node modules in it. Like this: exports.hello = hello Normally, I would just use hello = require './hello.js'. However, becuase the code is stored in the db, I can't include a path to the file. When I try a

Appcelerator Alloy - Requires Android Menu

I got a Problem with the Require src="menu" with Alloy. I get an compile error when I want to import my Menu via the Require XML-Tag. my Menu.xml: <Alloy> <Menu id="menu"> <MenuItem onClick="doSomething" title=

php get the root of the file

how can i get the root to the main folder? for example i run file in this location : public_html/admin/user/etc/index.php and i want to include file from public_html/includes/user/etc/function.php so i want to do something like this: include(get_firs

PHP requires vs grails include

I wanted to know the command which is exactly equal to php require in my GSP (Grails server pages) or in Groovy. I know I can use <g:include/> but wanted to know is there any command which will fulfill php require in groovy/grails?An exact equivalen

Can not require RubyGems

I have RubyGems version 1.8.5 and Ruby version 1.8.7. My problem is that even after installing gems I am not able to require it. On the command line typing gem list --local gives: bundler (1.0.15) hpricot (0.8.4) json (1.5.1) redcarpet (1.17.1) But t

No need to require 'rubygems' first?

I am currently reading through this guide: http://guides.rubygems.org/what-is-a-gem/ Under the third section ("Requiring code"), it says that if I run require 'rake', it should fail, because "because RubyGems isn't loaded yet.". Howeve

Extending Array.prototype in Node.js, from a required file

I have the following saved in test.js. It successfully extends Array in the browser, but it doesn't seem to work with node and require. Can someone explain what's wrong here? (function() { Array.prototype.max = function() { return console.log("Array.

Ruby needs a path

I have a Ruby code with different classes in a few files. In one file, I start the execution. This file requires my other files. Is this a good way to start a ruby code? When I run the code from a symbolic link, for example DIR2/MyRubyCode is a link

PHP: Can include a file that file_exists () says does not exist

In my script, I set the include path (so another part of the application can include files too), check that a file exists, and include it. However, after I set the include path, file_exists() reports that the file does not exist, yet I can still incl

Ruby unable to use require

This is a newbie question as I am attempting to learn Ruby by myself, so apologies if it sounds like a silly question! I am reading through the examples of why's (poignant) guide to ruby and am in chapter 4. I typed the code_words Hash into a file ca

How to create a class in memory, then include it in Perl?

So I am toying with some black magic in Perl (eventually we all do :-) and I am a little confused as to exactly how I am supposed to be doing all of this. Here is what I'm starting with: use strict; use warnings; use feature ':5.10'; my $classname =