In the wonderful world of Java/JSP, you can use this form of commenting: In in the much less wonderful world of PHP, the only reference to comments I can find are these: and these: But these WON’T comment out chucks of HTML and PHP tags: results in /* and */ being rendered to the browser, and do_somethi…
Tag: php
Bootstrap navbar vertical not horizontal
I am making a mobile responsive site with Bootstrap 3.3.4. I will be making it with server side includes when I can get the web.config file written up since I am using an IIS server. This is what the nav bar looks like with just the bar. This is what I want it to look like. Does Bootstrap not like
How to set breakpoints in a php script using gdb
I am trying to debug a php scripts via console with GDB but I am not able to set breakpoints. This is what I’ve done. I’ve created a script with this content:
Where to find composer’s global packages?
For a plugin for Sublime Text I was required to install a composer package globally. In order to do this I had to run the following command: composer global require “asm89/twig-lint” “@stable” The …
Laravel Socialite: InvalidStateException
I’m using Laravel Socialite to add a Facebook connect button on a website. Sometimes, I’ve got this error on callback: exception ‘LaravelSocialiteTwoInvalidStateException’ in /example/vendor/…
Laravel 4.2: Convert a SQL select statement to Eloquent statement
I have the following DB::select statement: Which its result will be something like: what is the equivalent statement using the Eloquent model? This is what I have so far: Answer You can use this: You need to use DB::raw when using count in your query’s select, because otherwise it will get quoted by PDO…
calling controller function from view and retrieving rows from db using AJAX in codeigniter
I am trying to retrieve rows from database by making an AJAX call to the controller function. I have no error messages and the code is executing properly upto $(“#msgbox”).html(“Type the name of …
Is it possible to change PHP error log output?
I have configured the error_log directive in my php.ini file, like this: And then I configured the error_reporting directive like this: When I check the error_log file, I see normal PHP warning/error text lines: Is there is a way to change output format? I mean, if I can print, for example, the IP address and…
Laravel 5 – get ID by other field properly
I want to get the ID of a user in a middleware by searching with his email. I thought about doing it like this in one of two ways. First, creating a function in the model User: public function …
Error: Class ‘Stripe’ not found
I’m trying to use the Stripe php api in a Bolt extension but it’s having trouble finding the class. I added the Stripe library to composer.json: And ran composer install. myextension/vendor/composer/autoload_classmap.php now shows the classes loaded: And now I’m trying to use it in the exten…