Skip to content

Commit

Permalink
fixed error vendor/autoload.php from composer
Browse files Browse the repository at this point in the history
  • Loading branch information
Joungkyun committed May 30, 2017
1 parent 9eebfb1 commit 6a41f4f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,45 @@ echo "matched\n";
?>
```

## Composer

first, make composer.json as follow:
```json
{
"require": {
"joungkyun/ereg-extension-wrapper": "1.0.*"
}
}
```

and, install ***ereg-extension-wrapper***

```bash
[user@host project]$ php composer.phpt install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing joungkyun/ereg-extension-wrapper (1.0.1): Downloading (100%)
Writing lock file
Generating autoload files
[user@host project]$
```

and, write code as follow:

```php
<?php
require_once 'vendor/autoload.php';

echo 'eregi_replace is supported ';
if ( function_exists('eregi_replace') )
echo 'YES';
else
echo 'NO';

echo "\n";
?>
```

## Credits
JoungKyun.Kim
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"support": {
"issues": "https://github.com/OOPS-ORG-PHP/ereg-extension-wrapper/issues"
},
"autoload": {
"files": [ "ereg-wrapper.php" ]
},
"require": {
"php": ">=7.0.0"
}
Expand Down

0 comments on commit 6a41f4f

Please sign in to comment.