简体   繁体   English

需要作曲家的phptimer供应商

[英]require composer's phptimer vendor

My code is the composer phptimer function. 我的代码是composer phptimer函数。 I would like to run it to see if it works only when I go to the page the code is on it returns a 500 internal error. 我想运行它以查看它是否仅在我转到该页面上的代码时返回500内部错误。 I think it has to do with the require. 我认为这与需求有关。 How should I properly include the autoload file? 如何正确包含自动加载文件? It is in: puplic_html->phptimer->vendor->autoload.php 它位于:puplic_html-> phptimer-> vendor-> autoload.php

<?php
require '/phptimer/vendor/autoload.php'
PHP_Timer::start();
print("-------OUTPUT------");
$time = PHP_Timer::stop();
var_dump($time);
print PHP_Timer::secondsToTimeString($time);
?>

You're missing a semicolon on the second line. 您在第二行缺少分号。 If it won't help enable error_reporting. 如果无法帮助启用error_reporting。 Also check your path because I think it may cause next problems. 另外,请检查您的路径,因为我认为这可能会导致下一个问题。 I advise you to use relative path, now php should treat your path as absolute. 我建议您使用相对路径,现在php应该将您的路径视为绝对路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM